Equipping / unequipping tools is causing FastCluster rebuilds

As per the Avatar Rendering Improvements from 8 months ago, tool equipping / unequipping shouldn’t cause FastCluster rebuilds. And yet… it is.

This is specially more noticeable when equipping / unequipping tools that contain a lot of triangles. (the performance implications are beyond the point; this is a bug report about the fact that FastCluster rebuilds are still happening even though they shouldn’t)

This can be reproduced in any place, including a baseplate. The screenshots in this post were taken in SCP: Roleplay.

Important note regarding the severity of this bug: we have no possible workaround for this since any workaround would imply moving away from tools and the entire game is built around the usage of tools. Even a keycard tool (1 part) causes this issue (albeit at a much smaller scale). If a player spam equips / unequips a tool, everyone around a radius of that player has FPS regression.

Additionally, Transparency updates are also still causing FastCluster rebuilds, but since that hasn’t been officially reported as implemented I haven’t made a separate bug report for it.

Repro script (run in server console):

local Player = game:GetService("Players"):GetPlayers()[1]

local a=Instance.new("Tool", Player.Backpack) local h=Instance.new("Part",a) h.CanCollide=false h.Name="Handle" for i = 1, 500 do local b=h:Clone() b.Name="Part" b.Parent=a local w=Instance.new("WeldConstraint") w.Part0=h w.Part1=b w.Parent=b end print'done'

A private message is associated with this bug report

1 Like

Hello, I have confirmed that the optimization we put in to skip rebuilding FastCluster is still working as intended in that it doesn’t rebuild the full avatar whenever equipping the tool. The ~1-2 ms updateGeometry time you are seeing in the Microprofiler is actually the optimized path that is doing the skip check, as otherwise without the optimization the time would be much higher.

I have tested SCP-Roleplay and checked your Microprofiler log as well.

If you have a reproducible rbxl file or case that produces much larger time cost, please attach it to the private message thread and I will take a look.

Also note that the transparancy (and color) change optimization has been rolled out for several months, so if you are still getting significant FastCluster rebuild time for transparency/color changes, please submit a reproducible case for us to debug.

1 Like

Hi, thank you for reviewing this! I have sent additional information, including a repro file.

You are right that the Transparency and Color improvements have been functional for a while; however, for the specific case of tools, there seems to have been a regression, since I remember this having ceased to be a problem during that time. (and now it’s happening again)