Build Control Panel lags Unity for large scenes
tracked
CyanLaser
I am using Unity 2017.4.28f1 and just updated an old but large project to VRCSDK-2019.06.25.21.13_Public. Opening the Build Control Panel or switching to it from another window lags unity for 3 or more seconds.
This only happens in large scenes as creating a new scene has no issues in the same project. This scene has 8500 GameObjects for reference.
Log In
This post was marked as
tracked
The title of this post has been updated for accuracy. (It no longer references a specific, old SDK version.)
Happyrobot33
this needs to be checked again and closed if not true anymore, since the SDK window was basically entirely rewritten recently
Jasper Raine
This is still an issue in sdk 2 2020.06.16.20.54
Unity will freeze to the point where it will either take hours or not work at all.
Aev
CyanLaser There's been a lot of changes to the SDK recently to reduce lag, is this still a problem for you?
CyanLaser
Aev:
This is still an issue with SDK2 2020.05.06.12.14. I forgot this canny existed and made a new one with a more specific example.
Check Merlin's comment below for what appears to be the actual cause.
g
gg67
interested
CyanLaser
Just so people know, the issue was not related to the sibling object checks. It was actually calling AudioSettings.Reset(config) every time the window is clicked and for some reason this freezes unity for a few seconds.
Merlin
Some more information on this -- at least part of the issue is that there's a worst case n^2 check on sibling objects on every draw of the control panel UI if no early out conditions are met. Starting with the line that has the comment "// check sibling game objects" in VRC_SdkControlPanel.cs.
For instance, if you have 500 objects that are children of 1 object in the scene, each of those objects will check against all other children in their parent object. This ends up being 250,000 checks already since it's 500 objects checking against 500 other objects. Getting into the thousands of objects ends up being millions of checks.
I have a scene with 6500 objects that are uniquely named so the early out checks don't get hit and it's not possible to interact with the control panel without editing out the sibling check from the control panel script since it takes so long for Unity to go through the checks.
g
gg67
CyanLaser Any chance you can send us editor logs?
g
gg67
tracked