Significant performance overhead to parenting Actors

I am working with Parallel Luau and I have an initialization step for cloning and parenting all of the actors.
This step takes a suspiciously long time, though, and not due to the scripts inside of the actors loading. Instead it’s something called “assemble”.


The picture shows the creation of ONE actor, isn’t 3ms a lot? Well it’s enough to cause a lag spike when creating loads of these, at least.

Roblox documentation describes “assemble” as this:

Updates a tree of connected objects (assemblies) used by the physics engine.

This makes no sense to me. The actor has no physics objects inside of it nor is it a descendant of workspace.

Why is this taking so much time? Is there a way around it?

4 Likes

I’ve also encountered this while cloning actors, I also wonder why it takes this unreasonable amount of time

1 Like

Damn, That is really weird. Hope they figure out the issue ASAP!

I should also mention that, for some reason, this “assemble” step just stops happening after ~15 actors have been created.


(You can see the purple “assemble” bit has disappeared after a certain point)

In case it’s of any benefit, here’s my code

debug.profilebegin("create actor")
	local actor = ActorTemplate:Clone()
	actor.Name = "Actor"
	
	actor.Finished.Event:Once(onFinished)
	actor.Parent = ActorFolder
	actor:SendMessage("init", chunkX, chunkY, chunkZ, editableMesh, Config)
debug.profileend()

Bumping in the hopes that some kind admin will respond :')

Still don’t know why this is happening but I got around the issue in my game by creating less actors (which did require me to restructure a lot of things)

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