Performance getting nuked by GizmoManager

Zurigan

New member
The screenshot shows what happens with ~1000 behavior trees going in and out of a pool. The underlying issue is that enabling one behavior causes two EditorPrefs requests for every behavior. For now I 'fixed' this by downloading the source and commenting out

C#:
#if UNITY_EDITOR || DLL_DEBUG || DLL_RELEASE
            // let behavior designer know
            if (onEnableBehavior != null) {
                onEnableBehavior();
            }
#endif

In BehaviorManager.cs ... as far as I can see this is ok to do(?). Possibly a better fix would be to cache EditorPrefs instead of re-querying them thousands of times over any time a single behavior is enabled.
 

Attachments

  • Screenshot 2020-10-02 184424.png
    Screenshot 2020-10-02 184424.png
    186.5 KB · Views: 4

Justin

Administrator
Staff member
Thanks for tracking that down. I have it fixed so it no longer calls EditorPrefs so often. Send me a PM with your Unity version and I'll send you the fixed version.
 

Zurigan

New member
Thanks for the offer, think I'll leave this for now as planning on looking at/maybe changing more of the BD code.

As an aside is there any way to see what 'version' of BD I have when downloading the source?
 
Top