Absurd Game Lag

I’m making a game using various open-source libraries such as PartCache to pool parts, but when I am using a skill I experience incredible framedrops for brief periods of time. I was just wondering if anyone who is experienced with the microprofiler could help me identify details about what could be causing this through the profiler.

The profile is microprofile-20230914-181505.html (5.5 MB).

Seems like it is caused by updateInvalidatedFastClusters


(This is one frame, updateInvalidatedFastClusters takes 29ms out of like 37)

I don’t really know what that is, seems like a roblox thing for characters, there’s this bug report that talks about it

Apparently, parts parented to the character causes this?

(From that post)


Edit: I read more of the post and this seems to be quite a big issue for many games. Staff members state that it has a 4ms limit per frame but apparently that is not the case, and even things like zooming in (character goes transparent) can cause some lag spikes

Thanks! Unfortunately, I don’t think there are any extra parts parented to the player, but I’ll check it out.

It seems like mostly anything that modifies the character causes that code to trigger, not just parts
Though I do not know much about that issue, I only read the post I linked above