[SDK2][2020.05.06.12.14] Build control panel laggy when large number of objects with same parent
tracked
CyanLaser
When you have a large number of objects all under the same parent, the Build Control panel becomes extremely laggy.
In my scene, I have 2048 objects, each with a vrc_trigger. Switching to the build control panel takes 80 seconds and allocates over 2gb. Attached screenshot is a deep profile of the editor.
Sort of related, but disabling the parent of these objects "fixes" the lag. I assume this means that any checks the sdk tries to do ignores disabled objects.
Log In
Takanu
I have the same issue though I have different specifics on how it affects me. So long as only one type of object has thousands of instances in the scene Control Panel is "fine".
As soon as more than one type of object hits those numbers it becomes unresponsive to the point that Unity needs to be force closed.
Momo the Monster
tracked
CyanLaser
This affects both SDK2 and SDK3. The logic for checking if paths are the same is contained in VRCSdkControlPanelWorldBuilder.cs and starts at line 464. Reading the code, it goes through all Enabled objects (ignoring disabled objects) and for each of those, it loops through all sibling objects to find an object with the same name. There are no caching optimizations and the runtime is n^2 to check if any sibling has the same name. In large scenes, just switching to the build control tab can take 5 minutes to load, and changing to any other window and back restarts the timer. You cannot use your computer at all for this time if you want to build or upload your world.
ElfMom
this is still a thing. And man is it obnoxious