Search Unity

Editor loop at 100% (100ms+) on 2020.1.0b3, 2020.1.0b2

Discussion in 'Linux' started by P0150N, Apr 1, 2020.

Thread Status:
Not open for further replies.
  1. P0150N

    P0150N

    Joined:
    Aug 1, 2015
    Posts:
    9
    Anyone else having issues with the beta editor where there is a constant lag (feels around 15 FPS), and when using the profiler, the Editor loop is at 100% usage?

    The profiler only shows that the overall is 100%, and no single process is responsible for it.

    Note: I am using Arch Linux with i3 window manager.

    I know Arch is not supported, but this issue does not exist on 2019.3.5f1, it only happens on the 2020 Beta editors. I am wondering if any other Arch users are experiencing the same thing with the latest Beta editor.

    For reference, I install all my editors using the Unity Hub package on AUR: https://aur.archlinux.org/packages/unityhub/

    I also attached a screenshot of what it shows in the Hierarchy of the profiler.

    Edit: Tested on newest 2020.1.0b4, issue still occurs. Also, issue occurs regardless of using OpenGL or Vulkan, editor is still at 15 FPS or less.

    2020-03-31_19-11.png
     
    Last edited: Apr 2, 2020
    Jeremy-Borton likes this.
  2. P0150N

    P0150N

    Joined:
    Aug 1, 2015
    Posts:
    9
    For anyone else that will or might have this obscure problem in the future, here's a solution that doesn't make sense but it worked anyways:

    1. Go to Edit > Preferences
    2. In the general section, find "Interaction Mode" (should be at the way bottom)
    3. Set the value to "Monitor Refresh Rate" (mine was set at "No throttling")

    CPU was instantly freed up in the editor, and the issue does not occur anymore.

    Edit: Here's a 100% way to reproduce the problem:

    1. Same section in general
    2. Set the value to "Not throttling" (nothing will happen)
    3. Restart editor
    4. When the editor re-launches, the editor will be very slow and at 100+ ms on CPU. Follow above instructions and it will fix itself
     
    Cherie, Crawdad, Ne0mega and 10 others like this.
  3. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Hi P0150N, is it possible that you have something in your project that triggers some infinite repaints of some editor windows? If you have a project to share that would be nice, so we can investigate this further.

    Thanks,
     
  4. Guirao

    Guirao

    Joined:
    Nov 24, 2012
    Posts:
    68
    Hello I am experiencing the same problem but on 2019.3.9f1. The game is running and the profiler is the editor one, taking almost 100 ms. It seems that most of the time is waiting for gfx.

    The suggested fix from P0150N didn't work.
     

    Attached Files:

    Lopost likes this.
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,456
    @Guirao that's 100% a different issue. Your game is GPU / Render Thread, or vSync bound is all. Please check the Profiler documentation for Common samples, check timeline view, profile a build and open a different thread if you still think this is an issue with the Editor.
     
  6. P0150N

    P0150N

    Joined:
    Aug 1, 2015
    Posts:
    9
    Hi jonathans42,

    It happens on any project, I was able to replicate it just from creating a new empty scene project.

    However, since you did mention something about infinite repaints of windows, it might just be an arch + i3 - related issue, since those are not supported by Unity.
     
  7. GGraca

    GGraca

    Joined:
    Oct 13, 2015
    Posts:
    1
    A similar thing happens to me with Arch + Sway (window manager inspired by i3).

    Editor Loop is taking 1s but only if I have an editor window in another workspace, not visible to the user.

    Closing the other editor window, moving it to the same workspace or moving it to another workspace, visible in a secondary screen, fixes it and brings the FPS from <10 back to 200 in my case.
     
  8. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    I don't know if it's same problem but I just installed 2020.1.0b7 and get all cores fluctuating around 20% just sitting in the editor.
    I don't have this problem with my 19.3b install though so I think this is something new to 2020.
    If I open the Help->About and then close it, I end up with one core permanently at 100%.
    Mint 19.3, 3700x
     
  9. jaredgaul-ics

    jaredgaul-ics

    Joined:
    Jul 25, 2019
    Posts:
    1
    I ran into a similar issue today in 2020.1.0b8 where all of a sudden my project wouldn't run over 70fps. Usually it's in the hundreds of fps. Profiler showed a heavy editor loop hogging everything.Clicking Layout -> Revert Factory Settings fixed it for me.
     
  10. Lopost

    Lopost

    Joined:
    Aug 10, 2017
    Posts:
    5
    Hey, have you solved this problem?
     
  11. BySGI

    BySGI

    Joined:
    Aug 31, 2017
    Posts:
    3
    Hi @MartinTilo,
    i have in EditorLoop time ms 25973. Every expectation complicates development. Perhaps you can suggest the reason for this expectation?
     

    Attached Files:

  12. toyhunter

    toyhunter

    Joined:
    Mar 5, 2018
    Posts:
    76
    @P0150N Amazing, your #2 solution instantly works on my project on Unity 2020.1.5f1
    Unity fellows it would be great if we could test/optimize our game performance while isolating/disabling the editor itself during profiling.

    [Edited] Further it lower the CPU consumption of Unity3D in my MacOS (MBP 16 inch) from 13x% to around 50%
     
    Last edited: Sep 15, 2020
  13. tbillington

    tbillington

    Joined:
    May 6, 2020
    Posts:
    5
    Got this too on 2020.2 beta. Nothing going on script wise, 110~ms frame time, profiler just shows "Other" as taking 99% of the time, not obvious what's going on.
     
  14. saarg

    saarg

    Joined:
    Mar 9, 2017
    Posts:
    31
    I'm having this issue too, I'm not sure how or when it started but it makes thinks almost unusable. The suggested workaround didn't work for me. I'll try from a fresh install later this week.
     
  15. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,456
    Hi everyone,
    This is a topic and issue description that is way too vague for us to do anything about it and way too likely for you to read this and think you are hitting the same issue, when really you are all experiencing different root cause issues that lead to the same symptoms. That is because the stated symptoms here are way to broad.

    I'd therefore like to ask all of you that are interested in finding a solution to this, to dig a little bit deeper and then file a bug report.

    To do so, please:
    1. Make sure to Profile the Editor, not Playmode. Pre 2019.3 you do so by pressing Profile Editor, in 2019.3 and up, you change the target from Playmode to Editor.
    2. If you are on 2019.3/4, keep the Profiler Window closed and just press F9 to start profiling while not in play mode (this will automatically choose to profile the Editor so you can skip step 1). You can enter playmode after that and it will continue to profile. Press F9 to stop profiling again. A console log with a link can be used to open the data you just captured, or just press Ctrl/Cmd + 7.
    3. If you are on 2020.1 or newer, you can alternatively open the Standalone Profiler via Windows -> Analysis -> Profiler (Standalone Process) and use that to profile the Editor. The F9 key works with that too.
    4. Investigate a bit what is going on in the frames. Just looking at the top level samples like "PlayerLoop" or "EditorLoop" is not gonna get us very far here. I promise, getting to know the Profiler a bit will pay off for you and your project. We've been working hard on getting the documentation in shape so make sure to check that out. If you have any feedback on the documentation, please let me know. Also, this introduction to profiling Unite Now presentation could be valuable, and check out the Manual section on common samples to help make sense of the data you are looking at.
    Step 1 should get you past the truncated sample hierarchy for "EditorLoop". Essentially the Profiler is trying to minimize the impact of Profiling your playmode by not instrumenting all the code that is running for the Editor only. It is then categorizing it as "Other" together with log message overhead and some other timings. So if you are interested to find out what this "Other" or "Editor Loop" thing is all about, step 1 is essential.

    To dig further into the "Other", or any other category for that matter: The charts will highlight the contribution of the current selected sample and it's call hierarchy. So you can select samples in Hierarchy or Timeline view to bisect which parts of the call hierarchy contributed to which categories. Also, Timeline view is color coded. Any color that is present in the main thread in timeline view, but not in the CPU Usage chart, is attributed to "Other". (CC @tbillington)

    While investigating like this you may find some custom Editor extensions or Asset Store extensions or packages or base Unity functionality to appear to be the cause for this. This information as well as which particular samples are an expression of that issue, get us closer to figuring out what's going on and who can do something about it. If it ends up looking like something is at fault on the Engine/Editor side of things:

    Please file a bug report.

    This will not only give us further critically important information like your hardware specs and OS (the original post was Linux specific and this thread is in the Linux editor sub forum, but it isn't entirely clear if all respondents are actually using Linux or a 2020.x version) but also make it easier for us to track, respond to you and act on these issues.

    And yes, one for each user, not one for this entire thread, because they are very likely not related to each other. If they are, we'll flag them as duplicates on our side which will increase the urgency on the issue it duplicates and provide further details that may lead to us finding the issue and a solution faster.
     
    Last edited: Oct 6, 2020
  16. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,456
    This looks like entering playmode times, which is not really what the topic here was originally about. However the Editor Iteration Profiler might provide further insights into this particular issue, which seems to be around script compilation times and that area is getting some attention right now, especially around compilation times for packages. Still if there is a noticeable regression there, it might be valuable to report that as a bug.
     
  17. saarg

    saarg

    Joined:
    Mar 9, 2017
    Posts:
    31
    Thanks for the detailed troubleshooting guide for now I wasn't able to get much more information from the profiler. What made me add to this thread is that I'm using Manjaro and have almost the same editor loop duration (around 100ms).
    I'll just wait for my new SSD in a couple days and try on a fresh install of manjaro and if I still get the issue I'll check on Ubuntu and then make a bug report once I have more to report.
     
    MartinTilo likes this.
  18. dngulin

    dngulin

    Joined:
    May 11, 2019
    Posts:
    3

    Attached Files:

  19. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    We do have a fix coming for this. It's making it's way into trunk.
     
    toyhunter and saarg like this.
  20. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Last edited: Nov 19, 2020
  21. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    This is fixed in 2021.1.0a4. It looks like there is a backport coming for 2020.2 as well. It should be in the next public build. Keep in mind that we normally don't backport changes for Linux. Looks like some kind soul took it on though.
     
    hopetolive and Advis91 like this.
  22. P0150N

    P0150N

    Joined:
    Aug 1, 2015
    Posts:
    9
    Could we have somebody at Unity lock this thread? I feel that most of the conversations have gone off-topic with the original issue and now we just have posters chiming in with completely unrelated topics.
     
    SioHio likes this.
  23. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Done.
     
    MartinTilo likes this.
Thread Status:
Not open for further replies.