buildSkeleton taking too long, effectively freezing the game

In large maps with a large amount of parts, buildSkeleton will start consuming way too much time per frame, resulting in the game effectively freezing consistently whenever moving around, equipping / unequipping tools, etc.


image

StreamingEnabled is on, using Opportunistic streaming.
StreamingIntegrityMode is disabled.

The parts are split up in 128x128 groups of Models, using Atomic ModelStreamingMode.

The frame time is quite excessive and causes the game to hang frequently, making it almost impossible to play.

Character accessories do not matter, as this can be reproduced on an empty character with no accessories nor character appearance loaded.

It’s difficult to provide an easy way to test this given the circumstances this is being implemented in (new content for a group focused on in-game research), but I can provide the build files to staff who may need it to test and work on this bug.

I thought the problem to be streaming related but it appears to be related only to the amount of parts.
GlobalShadows is off.

The map parts are not part of any skinned mesh / Bones, Humanoid, etc.

Models LevelOfDetail has no impact on this.

As a workaround, I am loading the dimensional folders in and out depending on the player’s position, which is helping reduce the frame times, although this is obviously not ideal and has memory implications.

This is being tested on a Computer, as that is the intended device for this gameplay, but it’s likely that it also happens on Mobile.

A private message is associated with this bug report

3 Likes

Hey there, it is likely that your scene has skinned meshes that are parented to the workspace, not parented to a separate model instance (e.g. a character). If that is true, it can cause a large number of unrelated skeletons to be invalidated. This is a known issue that is on our roadmap to fix. You can work around it by parenting each one to a model instance (that is not the workspace). Let me know if that helps.

2 Likes

Hi, that is an interesting point to keep in mind.

Unfortunately, I’ve looked through any instances with a Bone and all of them are inside a Model.
Is there any other situation where this can occur? Perhaps some other Instance that isn’t Bones?

The file where this happens can be found in the private message:
https://devforum.roblox.com/t/private-information-bug-report-from-metatableindex/3548102