# Time spent in AttachToComponent

**URL:** <https://forums.unrealengine.com/t/time-spent-in-attachtocomponent/2174059>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [December 5, 2024, 4:15pm UTC](https://forums.unrealengine.com/t/time-spent-in-attachtocomponent/2174059 "2024-12-05T16:15:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anders.Moden](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/anders.moden/32/975685_2.png) [@Anders.Moden](https://forums.unrealengine.com/u/Anders.Moden)\
**Post date:** [December 5, 2024, 4:15pm UTC](https://forums.unrealengine.com/t/time-spent-in-attachtocomponent/2174059/1 "2024-12-05T16:15:07Z")

</div>

Why does a AttachToComponent in a static mesh take 5.1 msek when a AttachToComponent for a USceneCompoenent takes 0.003 msek ? All parent components are stationary except top that is movable.

I guess its physics and collisions etc in meshes. How can I disable as much as possible and just get the meshes in as fast as possible ?

You can look at the project at [GitHub - ToolTech/CSWUnreal: Common Synthetic World streamed into Unreal](https://github.com/ToolTech/CSWUnreal)

---

<div class="post-metadata">

**Author:** ![Anders.Moden](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/anders.moden/32/975685_2.png) [@Anders.Moden](https://forums.unrealengine.com/u/Anders.Moden)\
**Post date:** [December 7, 2024, 9:57pm UTC](https://forums.unrealengine.com/t/time-spent-in-attachtocomponent/2174059/2 "2024-12-07T21:57:19Z")

</div>

Found the problem. I had the wrong order of AttachToComponent and RegisterComponent

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 6, 2025, 9:57pm UTC](https://forums.unrealengine.com/t/time-spent-in-attachtocomponent/2174059/3 "2025-01-06T21:57:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
