Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback (Case 1206572) Editor UI performance regression

Discussion in '2019.3 Beta' started by Peter77, Dec 19, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    Editor UI performance has significantly worsen compared to earlier Unity versions.

    2019_3.png
    2017_4.png
    I didn't select one of the peaks, but a sample that seems to be an average, to make a fairer comparison.

    [Edit]
    As a bonus I've now also added a screenshot from 2020.1:
    2020_1.png
    [/Edit]

    Reproduce
    1. Create new project in Unity 2019.3.0f4
    2. Execute "Window > Layouts > Default"
    3. Open Profiler Window
    4. Change Profiler from Playmode to Editor and start recording
    5. Constantly resize the Inspector panel
    6. Stop Profiler
    7. Repeat the test with Unity 2017.4.34f1
    8. Compare the CPU timings in the project of both profiling sessions

    Actual
    UI performance is significantly slower in Unity 2019.3.0f4 than in 2017.4.34f1.

    Expected
    Faster or at least the same editor UI performance as earlier Unity releases.

    Notes
    1. Unity 4.x editor UI used to be faster than 2017 I believe, but I don't have a pro license where I could run the profiler in 4.x.
    2. Please reproduce this issue on Unity 4.6 too.
    3. Please use hardware similar to the PC I used to submit this bug-report with. You probably can't reproduce it on high-end machines.

    PS: Please let us keep this thread professional and emotionless.
     
    Last edited: Dec 24, 2019
    apkdev, justtime, Tanner555 and 13 others like this.
  2. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    390
    Thanks. Quick question if i may, does 2019 have different (perhaps more?) subwindows e.g. inspector, asset store, package manager open by default than 2017? That might explain some of the performance loss when resizing as presumably the whole editor ui has to redraw? I only have 2018 so can't easily answer this myself!
     
    Peter77 likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    Nope, it's the same number of windows. Actually they're literally the same windows :)
     
  4. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,912
    Wow I'd say this shows quite a regression in Editor performance. Anyone have any insights as to what's causing this?
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    I've updated the first post with a 2020.1 profiler screenshot. 2020.1 is faster than 2019.3, but still significantly slower than 2017.4, which is slower than 4.6 :)
     
  6. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
  7. DoctorShinobi

    DoctorShinobi

    Joined:
    Oct 5, 2012
    Posts:
    219
    Good job Peter. You're a one-man QA army
     
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    Hey, I just received an email from Unity:
    This response makes no sense to me. The UI draws 2-3 times slower than in 2017 releases. Who knows how much slower compared to 4.6.

    Why would you mark this issue as "Won't fix"? I mean it's not like you're trying to make Unity slow on purpose, that would be absurd!
     
    Last edited: Jan 8, 2020
    Seb-1814, laurentlavigne and SugoiDev like this.
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,106
    Agreed, will follow up on this.
     
    laurentlavigne, SugoiDev and Peter77 like this.
  10. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    To follow up a little, the current reasoning is that the two are not comparable as the additional time reported now accounts for unreported time from before. So does it appear slower looking only at those numbers yes i agree it does but it doesnt tell the whole story that the additional time was just hidden before and you now see it.
     
    laurentlavigne likes this.
  11. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    That makes sense.

    However, based on this, wouldn't it be possible to exclude the previously-unreported-time to make a proper apples-to-apples comparison and verify there is no regression?
     
  12. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Please don't make comments like this.

    It makes devs less likely to address your feedback, and undermines the goal of the thread.

     
    MartinTilo and laurentlavigne like this.
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,001
    I disagree, and I disagree with your post, and I think your previous post also decreases the chances of getting a fix, since it ignores the original issue and evidence, but sure. I'm out of this thread.

    backandforth2.gif
     
    Last edited: Jan 8, 2020
    laurentlavigne likes this.
  14. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    390
    So, if the issue is explained because older versions of unity did not include certain aspects of ui processing in the profiler, can we assume that the benchmark of 2020 still does? And therefore 2020 is more performant than 2019?
     
  15. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    I'm just the messenger here as i was not the original dev who looked into it someone on my team did so i'm working off information that was passed on. I will loop back around and validate with them that they did in fact do such testing and find out more about which profiler marker was added and try to determine why it was added.


    2020 still would have the same marker though can't promise 2020 to be more performant but it is something we are actively testing within the editor and trying to find places where it can be improved.

    I do want to mention on thing as well us closing 1 bug about a regression that spans over 2 year of changes doesnt mean we won't still actively work on the larger issue of Editor performance. Did the bug help bring attention to a possible performance issue that was slowly introduced over years? yes, but we also have places where these larger action items can be better tracked outside of the bug reporting system. The reason for "wont fix" also boils down to our resolution options. "By Design" sounds worse (IMHO), "Not reproducible" diminishes the fact that there is a genuine feeling of a issue, "Fixed" would just be blatantly wrong.

    I am happy to keep this discussion going
     
    Seb-1814 likes this.
  16. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    Hey Phil, thanks for your reply.

    As an end-user, all I see is earlier Unity releases feel much more responsive. I want new Unity releases to feel responsive too.

    Closing the bug-report creates the impression that you don't care. I actually don't think that people at Unity Technologies don't care, but it's what closing the bug-report signals to people outside the company.

    The goal should be to fix these editor UI performance regressions and not to get lost in details whether it's because of this or that. Resizing the Inspector panel was a great way to easily show the performance difference of different Unity versions in a bug-report.

    If 2019.3 is slower than earlier releases, then it's an issue. In this case the report should be kept open/active until the issue has been fixed, that is when 2019.3 is as fast as e.g. 2017.4 as mentioned in the report.
     
  17. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Dont get me wrong it was just this particular case that the reason it was closed was that after 3 days of investigation it came down to the profile marker and we felt like we found the overall cause of the report. As i said we keep these larger issues at a more global level in different software as having 100+ bugs of "the editor feels slower" can cause some details to be lost so we combine them as needed elsewhere and close the bugs so other non global bugs dont get buried.

    Editor performance I can tell you is something that is high on the priority list not just for my team but for Unity as a whole and we know there has been issues in the past where new features causes the editor to slow down all around even if you dont need that feature and we dont want that to continue as a trend.
     
    konsic, TextusGames and optimise like this.
  18. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,029
    Is that currently still a lot of editor UI still not convert to UI Element yet that has much better performance?
     
  19. interpol_kun

    interpol_kun

    Joined:
    Jul 28, 2016
    Posts:
    134
    I can't understand who in Unity seriously thought that "Editor is not slower than it was, profiler just got new markers" is a good explanation.

    I watch Peter's threads closely and I got a strong feeling that Unity staff don't want to really investigate performance regressions at all and they just hope that DOTS (or something in future) will make it better.

    I can confirm that 2019.3 Editor feels much more unresponsive and slower than previous versions, especially old 2017 and 5.X releases. It's not because there are new markers previously hidden. It's just absurd. Moreover, I can't tie that slowness to a new SRP and PacMan because editor performance lies in a different domain (And I hope it is).
     
    Thomas-Pasieka likes this.
  20. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    I dont know the exact count of windows that have been converted to UIElements but any that have possibly are better.

    So i had the dev run the testing again without the profile marker and his comments were "I have removed the profile marker in the latest trunk and observed that the CPU time is around 80ms which is same as in 2017.4 version. With the profile marker turned on we get an additional 20-30ms CPU time" From what i can tell about this profiler marker is its at a higher level "UpdateScene" to be exact. This function is responsible for a lot of updates from updating the time, to ticking the player loop, to ticking input, ticking rendering calls and setting up the gfx device for the frame (this only names a few of the more majour ones it does a lot more as well). Now most of those inner functions already had profiler markers but previously there was a lot of time spent doing all the set up and initial calls that was not tracked so i believe this is where the 20-30ms we observed comes from.

    In this case with the data in the bug about the profile number being higher it is the additional marker that accounts for the change thus that resolution. But as i've stated we have a larger task of editor performance that is constantly being worked on. Are we sitting back going "DOTS will fix things"? No not at all even in a DOTS world the editor will still be (from my knowledge) the interface between you the user and the engine no matter what the underlying runtime looks like. The Editor HAS to be performant there is a lot of us (and we are hiring more) that are not working with DOTS whose job it is to make sure the non DOTS runtime continues to provide what is needed.

    I also get that there are a lot of people who feel the editor is slower which is why i'm willing to keep this discussion open. Can you narrow down the feeling to any particular event or action or workflow? What is it that you feel is slower? A response of "everything" really wont help us narrow down to a possible issue so any more specific details you can give would be appreciated.
     
  21. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    Resizing docked editor windows, exactly what I used as "is slower" demonstration for this bug-report. It's even visible in the video that 2017.4 resizes more smoothly than 2019.3.

    Please use hardware similar to my setup, you most likely can't reproduce it on high(er) end machines.
     
    SugoiDev, QFSW and phil-Unity like this.
  22. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    130
    In our case the difference is staggering from 2018.3 to 2019.3. In editor we never dipped below 60 fps during play mode and after updating unity it goes down to even 30 fps (with spikes of 15 fps), making VR testing a headache. All accounted for with EditorLoop in the profiler. Amount of open editor windows has a negligible effect on this.

    Note this is a play mode issue for us, and as such really concerning. It's not about the editor handling being sluggish (we have found it quite performant in fact), the game itself runs much slower.
     
  23. interpol_kun

    interpol_kun

    Joined:
    Jul 28, 2016
    Posts:
    134
    Yes, I can extract some examples from the "everything is slower" statement.

    Window resizing as it was mentioned above feels and also looks slower. Creating new assets sometimes can hang the editor for a few seconds, and overall it take more time that it was before. It's not tied to specific projects, I just create a new LWRP template for 2019.2.f17.

    Also we can talk about enter play mode times, they increased to, but it's obviously happened because of the package manager and old mono reload-every-assembly behaviour.

    My PC specs are not that bad: GTX 970, i5 4690K on 4 Ghz, 24GB of DDR3. I don't have an SSD, but that was never a problem when I started with Unity. It's not even a problem with Unreal.
     
  24. interpol_kun

    interpol_kun

    Joined:
    Jul 28, 2016
    Posts:
    134
    Also I can confirm that somehow Linux Editor is much quicker and smoother (cold launch times and overall performance) than Windows. But it has more bugs so I can't be sure if it's ready for any real work.

    I was testing on latest Manjaro with XFCE.
     
  25. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,994
    You guys ought to stop complaining because ... ECS!
    Just kidding
    I didn't believe the editor was sluggish, I thought that was me getting used to modeling in Medium so I installed 4.69, FRAPS and ... HOLLY F***AMOLI !

    Empty scene

    4.6.9 feels super smooth, resizing updates windows between 60 and 120fps

    2019.3 feels painful, windows refresh at ..... 23fps !!!!!!!!!!!!!!!!!!!!!

    That's nearly a 6x slowdown

    Did you rewrite the editor in javascript? Because it sure feels like a web page now.
    A regression like this ... I've never seen, even Maya with 30 years of bloat + autodesk.

    My advise: Don't despair, some of the new stuff is awesome. Just invite Nicholas for an informal meeting, freely pour some alcohol so he gets chatty and infiltered and let him bust your balls. Or clone him.

    EDIT: orbiting in the 3D view: 120fps on 2019, 240 fps on 4.6.9, on a 144hz monitor. 2x regression in performances in the 3D view.

     
    Last edited: Jan 9, 2020
  26. interpol_kun

    interpol_kun

    Joined:
    Jul 28, 2016
    Posts:
    134
    Even though FRAPS is not recommended for that kind of measures (and Unity staff always says so) we can clearly see the difference between the two editors when it comes to a resizing and scene view.
     
  27. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Last edited: Jan 9, 2020
  28. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,994
    yep, this is an awesome tool and may help find out why the 3D view is 2X slower when the engine itself is much faster at pushing polygons.

    I will bet all my pocket lint that it's the OnGUI autolayouting code that got the shaft.

    @interpol_kun is right FRAPS ain't the right tool to perf something - in the absolute. Relative bench might be dependable because it does feel more than 2x slower refresh rate side by side.

    To UT: the impact it has on us is worth considering: back in 4.6 I was addicted using the editor, now it is a chore, unpleasantly unresponsive. Reference to what was discovered in the 70s about perception (again, poke Nich's brain)
     
    Lars-Steenhoff and SugoiDev like this.
  29. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    Not sure if this is the "right" thread but compared to the regular Editor windows (inspector, project, ...), the Shader Graph one feels like running at 5 FPS when dealing with animated materials.

    One artist in our team still has a 4th gen i7 (or i5, not sure) and they can basically move the viewport around and wait for 1-2 seconds. Same with zooming in and out. Even my machine (threadripper 2950x) is having a hard time.

    (Not sure if this is something related to general editor performance or just the ShaderGraph team. I can provide the link to the shader file if necessary / make a bug report with it included).
     
  30. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Just to chime in:

    • 2019.0.3f starting play mode is painfully slow.
    • Adding a new C# file to the project sometimes hangs the editor for at least 10 seconds
    • Switching from VS to Unity after saving a file hangs the editor for at least 10 seconds
    • Opening and closing lists of objects in hierarchy/project tab is visibly slower than in old Unity versions
     
  31. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    130
    I have tested the latest release candidate (2019.3.0f4) and the problem persists:
    upload_2020-1-10_11-56-55.png

    As you can see, editor loop takes half of the frame time. EditorLoop was almost unnoticeable before and now it takes a 3 ms chunk and a 5.5 ms chunk.

    Edit: this is in a build in the same hardware:
    upload_2020-1-10_13-18-46.png
     
    Last edited: Jan 10, 2020
    Lahcene likes this.
  32. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,106
    Bug reports with reproducibles would be much appreciated.
     
  33. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    Submitted as (Case 1210658) Performance problems with animated ShaderGraphs
     
  34. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Thanks everyone for the feedback, Please keep it coming! I'm going to be devoting some time to investigation into the issues reported and see what comes out.
     
  35. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Also submitted Case 1209047 for extremely unresponsive editor using a large Shader Graph. Filed 7 days ago, posted the case number in the Shader Graph forum, but still no one's looked into it yet.

    If a Shader Graph editor window is open that contains a large graph, after pressing play in an empty scene, editor freezes for 20+ seconds while the Shader Graph window refreshes itself before going into play mode. Also about a 5-10 second freeze when changing Shader Graph property names. Can someone investigate this please?
     
    charlesb_rm and spaceemotion like this.
  36. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    So I'm not leaving you guys hanging, I've spent the last 3 working days digging into the issue and low and behold you guys are right (not that I doubted you). It does appear there is something going on that's caused more then a little slow down that's not accounted for by that profile marker. I don't feel like I'm anywhere close to a root cause yet but I'm still digging and going to pull in more people tomorrow so we can get to the bottom of this and at the very least know why. With any luck well also be able to do a fix but it appears as if it won't be a simple 1 liner
     
  37. interpol_kun

    interpol_kun

    Joined:
    Jul 28, 2016
    Posts:
    134
    Take your time to find and fix those issues, have a good luch. We can wait a reasonable amount of time, it's a lot better than being left unheard. We will be glad to hear more as you will dig it deeper.
     
    MechEthan and Peter77 like this.
  38. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,994
    Good luck! And thank you.
     
  39. charlesb_rm

    charlesb_rm

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    485
  40. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Sorry to clog this thread up with Shader Graph specific issues, but just wanted to let you know that my particular bug report was confirmed under a different entry in the issue tracker:

    https://issuetracker.unity3d.com/issues/shader-graph-unresponsive-editor-when-using-large-graphs

    Hopefully we can get updates about Shader Graph performance issues in the following thread, thanks:

    https://forum.unity.com/threads/adding-removing-modifying-properties-is-very-very-slow.800139/
     
  41. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    There is editor hang-up when you add and hang-up when you connect node. Please could you create SG like Blender Cycles.
    In Blender, shader nodes viewport is fast and instant. It is disconnected from rendering viewport which is compiling and rendering.
     
  42. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    So we were able to find some performance improvements that we've implemented and will be backported to 19.3. What we've found is that its been more the whole 19.X series that has had this slow down. Unfortunately we've been unable to link it to a single event on something thats changed that caused the issue. Once the changes land let us know if they've helped over all or not.
     
    Peter77, optimise, MechEthan and 4 others like this.
  43. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    Please let us know in what version the changes are expected to land, thanks
     
  44. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Once i have that information i'll update you. Its still in progress through our process so its not guaranteed in a version yet
     
    Peter77 and Lars-Steenhoff like this.
  45. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    Great, thanks
     
  46. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    Peter77 and JamesArndt like this.
  47. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Hey, first off sorry i really thought i had done a follow up i really didn't mean to leave you hanging.

    So there have been a bunch of small fixes that have landed back in 19.3 a few months ago that all incrementally improved the performance but there wasn't one silver bullet that we were able to find.

    - The style catalog caching saving 20-100 ms on domain reloads
    - Improves the style painter performances by around 1 ms when the TreeViewController is used to draw many items.
    - Optimize the SceneHierarchyWindow and GameView for repeated KeyDown events
    - Optimize the extended style painter by expanding and caching border radius and width values.
    - Fix stalling progress bar when entering play mode.
    - Add an option to throttle application tick timer
    - 0 = No throttling (run as fast as possible)
    - 1..33 = Wait 1 to 33 ms each frame at most or until the tick is signaled (i.e. when request painting a Window)
    - It can be useful for a laptop to set the throttling to a high number in order to save some CPU cycles, preserving the battery life time.
    - Improving material dragging over the scene view.

    I'm sure i'm missing a few PR's and fixes as well as there were quite a few of them. Are you seeing a better performance or still issues?

    2020.1 will also always run faster then the 19.x series and older as by default the editor is now run in release mode vs debug.
     
  48. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,912
    "2020.1 will also always run faster then the 19.x series and older as by default the editor is now run in release mode vs debug."

    Oh good God does this mean what I think it implies? Release vs debug mode? So 2020 and beyond should be quite a bit snappier!?
     
  49. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    If it's really this... What a high level of incompetence!
     
  50. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    It comes down to how Unity was compiling your code not the code that was driving the editor/ engine (we were not shipping Unity code base as debug). When you attach a unity debugger in 2020+ Unity will pop up asking to switch to debug.
     
    JamesArndt and jamespaterson like this.