Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

(Case 970882) Editor gets slow when using UnityEditor.IMGUI.Controls

Discussion in '2017.3 Beta' started by Peter77, Nov 20, 2017.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    The namespace UnityEditor.IMGUI.Controls provides a TreeView Control. Using this TreeView makes Unity slower over time. Or at least I noticed it when I was using the TreeView.

    In the provided test project, the TreeView contains 10000 items. Moving the editor window where the TreeView is rendered into, is fast and responsive first. However, scrolling the TreeView adds a persistent performance penalty to the window, where persistent means to get rid of the performance issue, I need to close the window. The more you scroll, the slower it gets.

    I recorded a video that shows in the Profiler that it gets slower over time. The interesting bit is that it does not seem the TreeView itself which is slow, but "GUI.ProcessEvents".



    Reproduce
    • Open user attached project
    • Open Mainmenu > BugReport > Open TestCode window
    • Move the window around and notice it's fast
    • Scroll to the bottom of the TreeView and then to the top again, do this 10 times.
    • Move the window around
    Observe that moving the window is very laggy. Scrolling the TreeView is also not as fast as it was at the beginning.

    Expected
    The editor should not get slower after using the TreeView Control.
     
    Last edited: Nov 20, 2017
    LeonhardP likes this.
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
  3. charlesb_rm

    charlesb_rm

    Joined:
    Jan 18, 2017
    Posts:
    485
    Good news as we found a fix for this issue and it will be available in RC1. Thanks for your help identifying the issue!
     
    zwcloud and Peter77 like this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    That's awesome, great job!