Below is a screenshot of where a majority for my game’s frame rate drops are coming from. I currently have a few ideas as to where they source of the slowdown is coming from.
Firstly, the bars that are shown to take up the most time are “computeLightingPerform” and “occupancyUpdateChunkPerform” within the “Render” group. What seems to cause these tasks to take up a lot of time involves a function where I’m replicating the swords of players in real time to attach and detach from that player’s right hand when they initiate attacks.
For all players, this involves cloning a reference of the weapon model, positioning it using some CFrame math, then attaching using WeldConstraints. When finished, it’ll delete this model.
For the local player, this transition is made to pretty using TweenService on the part’s transparency. For other players, the transparencies are immediately set instead of being tweened.
I’m not sure if it’s the tweens or the constant creating and destroying of parts that’s causing this to occur. It may be the latter, as I would have assumed that immediately setting transparencies would not cause a slowdown even though they still occur as shown in the microprofiler.
I can’t really find any solid evidence or discussion about whether or not consistently creating and deleting parts causes some sort of slowdown, so that’s why I’m bringing this here.