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 1052281) IMGUI.Controls.TreeView keyboard navigation is slow

Discussion in '2018.2 Beta' started by Peter77, Jun 23, 2018.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    The namespace UnityEditor.IMGUI.Controls contains a wonderful TreeView Control.

    When navigating this TreeView with the arrow-keys, the TreeView becomes very slow, depending on the number of total items in the TreeView.

    It is very fast and responsive if it contains only a few thousand items. However, if the TreeView contains one million and more items, it becomes unusable on my PC.

    Unfortunately, several million items is an actual real-world-number in my use case. I develop a memory profiler that often contains A LOT of items in large projects:
    https://forum.unity.com/threads/wip...filer-debugger-and-analyzer-for-unity.527949/

    screenshot.png

    Reproduce
    • Open user attached project
    • Open Mainmenu > BugReport > Open TestCode window (this takes about 10 seconds on my PC)
    • Open Mainmenu > Window > Debug > Profiler
    • Turn on "Profile Editor" and "Record" buttons in Profiler window
    • Select the first TreeView row in the TestCode window
    • Hold down "arrow-down" key
    Observe how unresponsive the selected item changes in the TreeView. Observe in the Profiler that "MyTreeView.OnGUI" often causes up to 1 second spikes.


    Expected
    The TreeView should not get slower with increasing number of items.

    Actual
    The more items in the TreeView, the slower the keyboard navigation becomes.
     

    Attached Files: