Search Unity

2017.3 Editor overhead performance degradation ?

Discussion in 'Editor & General Support' started by Grinchi, Dec 22, 2017.

  1. flybluesky87

    flybluesky87

    Joined:
    Sep 27, 2017
    Posts:
    1
    when i profile memory, i saw "Not Saved/Mesh" count increase by time.(that count maybe Text mesh)
     
  2. mekartikshah

    mekartikshah

    Joined:
    Jan 10, 2017
    Posts:
    89
    I have faced same problem in Unity 2018.1.6f1, but upgrading to unity 2019.1.4f1 solves my problem and bring my FPS from 5 to 200! strange.
     
  3. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    In 2018 3.6f1 the profiler window, itself, is a pig. With record off and play off and no windows but hierarchy, project, game and inspector, the profiler window is so slow it can barely be dragged or closed. The rest of the editor windows are responsive, but the profiler window is 90% a dead stick. I verified win firewall off, then turned windows defender off. Then closed unity and restarted the computer. I opened the project and the profiler window was responsive, and could be dragged. On play, with the profiler window open my project runs at 1 frame per second. What a pig! Then, suddenly, and for no apparent reason, 26 FPS by FPS Counter, which is normal for this project right now, and the profiler is working. Go figure? The profiler indicates the project is running at 60 fps. Don't know what to think at the moment.
     
    Last edited: Aug 13, 2019
  4. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    972
    Close the UI profiler lane. It is ****very**** slow.
     
    wood333 likes this.
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    That does not sound right. Can you please file a bug report through the bug reporter tool found in the help menu? I'd like to have a look at that but I'd need a repro project. In general we should have improved the performance of the Profiler window in 2018.3.

    Also did disabling the UI Profiler module work?
    Generally speaking, the different modules can have overhead that would vary from project to project. So far, I was aware that Audio module, especially in detailed mode, has a higher overhead on the collection side. GPU is disabled by default because it currently has a heavy impact on the players performance too.
    If any module, or the Profiler in general, has a performance regression, we'd want to know about it.
    Also, In 2018.2 I've added a performance test for the UI of the CPU Module to prevent regressions, it might not catch everything and we need more of these, also for the other modules. A bug report can help to push for more of these too.
     
  6. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    Also, in 2018.3, we've added the performance improvement that modules that have been disabled in the UI do not collect data in the player. Previously that was only true for the GPU module.
     
  7. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    There is currently a bug with the "Other" category where time that falls under this category will not be shown in the CPU modules frame time chart, unless samples that contribute to that category are selected. Such samples are e.g. the Editor Overhead, i.e. the fact that if you're running the game in Playmode in the editor, both the player and the editor run in the main thread and that that impacts the framerate if the entire editor and player frame. Additionally, there is a bug where a soft VSync (WaitForTargetFPS, the only VSync the Editor has) is falsely attributed to other due to the newly added WaitForSemaphore sample that was supposed to indicate that the CPU is idle for that time frame.
    For more reliable info about where time is spent, please check the Timeline view until those bugs are resolved.
     
  8. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    CC @alexquare :
    Can you two please deep profile this with profile editor and check if whatever is happening in sceneview or any other tooling that updates alongside sceneview is causing this? Then, if this is related to Unity code, please file a bug report for it?

    What does the profiler say, when you enable Profile Editor, eventually also Deep Profiling?
    Also, this could be related to a bug in 2019.x (that has since been fixed) where the the sceneview got rendered twice. supposedly that didn't happen in your version but if you profile it and the profiler tells you otherwise, please file a bug

    Please profile the Editor Overhead by swtiching on "Profile Editor" and depending on the results from that, please do file a bug for that, as well as one for the Audio manager.
     
  9. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    Could you please profile that with the new memory profiler package as well? There you could use the diff functionality to find leaking mesh data issues. If you find an issue that seems to stem from Unity, please file a bug for it. If you have trouble finding it in there but it still being visible in the Memory profiler module of the Profiler window, please let me know and also file a bug for that against the memory profiler.
     
  10. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    There are two UI modules. I disabled both, and the profiler ran much better during play. With the UI modules added back, the profiler window, "itself" falls to a crawl, even when not in play. When in play the entire editor falls to a crawl. Win 64 task manager reports unity not responding.

    This surprises me because the project has few UI elements on screen.

    NOTE: The "UIDetails" module seems to be the culprit, not the "UI" module.
     
  11. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    @wood333
    The only thing that might explain some of this that comes to mind, is that the UI Details Profiler, when selected, at some point cause the Profiler Window to repaint every frame instead of every 5 frames (as it usually does). That repainting has been fixed but I'm not sure when exactly.

    Besides that, It's an unknown issue to me and I'd appreciate a bug report with a small repro project :)
     
  12. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    972
    Yeah, this turned out to be a little more interesting than I thought. Even on our main project, it's not 100% reproducible. I thought it was but it turns out I only notice it when it goes wrong and makes the whole profiler crawl. It went wrong and I profiled it, and the draw calls issued in ProfilerWindow.OnGui.repaint were **astronomical**, around 300k SetPass calls or something utterly ridiculous like that, taking 1200ms to draw one frame. Then I tried it in a new project and it didn't happen. I tried to capture it on our main project again and it also didn't happen.
     
    Last edited: Aug 15, 2019
  13. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I am a one person developer without the time to spend paring down my project. I already lost more than a day on this. I will say that disabling the most cpu expensive assets in my project (all trees plants and water) had no apparent effect. However, I walked away from the project, and when I returned, the profiler was working correctly i.e. intermittent bug. Also, I never had a problem with the profiler in Unity 5, where I developed almost all of my project, so I suspect this bug was introduced along with more recent profiler and/or Unity "improvements."
     
    Last edited: Aug 15, 2019
  14. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    972
    In my experience it was introduced along with the UI Details profiler. The profiler itself is *miles* faster at rendering than it used to be, especially in deep profile.
     
    Last edited: Aug 15, 2019
    MartinTilo and wood333 like this.
  15. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    Well, I'd expect it should be limited to some uGUI UI setup. Maybe that is separatable? If it's intermittently, that makes it a bit trickier obviously... :/
     
  16. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    972
    Yeah, there seems to be some state there because it was crawling in the same scene under the same conditions where it was fine the second time round.
     
  17. sonnyb

    sonnyb

    Joined:
    Nov 5, 2013
    Posts:
    17
    @MartinTilo Since my post, I've upgraded to Unity 2018.3.8 (previously 2018.2.10) and I haven't noticed this in a while. If it comes up again I'll keep in mind to file a bug report.
     
    MartinTilo likes this.
  18. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,511
    I'm also having this problem in 2019.2.15. It goes away when the Profiler's UI panels are closed. However, so far I've been unable to isolate it in a smaller project :(

    Profiler bug.PNG