Search Unity

Unity Editor performance slow

Discussion in 'Editor & General Support' started by khollowell, Apr 13, 2021.

  1. khollowell

    khollowell

    Joined:
    May 21, 2018
    Posts:
    3
    I have a new Razer gaming computer, and the Unity Editor runs extremely slow.
    Opening any editor window (File > Build Settings) for example, takes 10-30 seconds.
    Moving any editor window will also cause a similar lag.

    An empty Unity project does not seem to have the same lag issues.
    However I have opened this same project on other computers and things run smoothly.

    Things I've tried
    • Adding -force-opengl under unity hub advanced project settings
    • Setting quality to low: Player Settings > Quality
    • Giving unity high performance via Task Manager.
      • Open Task Manager, go to details panel, right click unity.exe, set priority to high.
    • Re-installing & updating graphics drivers.
    • Re-installing unity editor

    My computer specs.
    Processor: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz 2.80 GHz
    Ram: 16gb
    Graphics: Nvidia GeForce GTX 1060

    Unity Editors I'm seeing this issue in:
    • 2020.2.7f1
    • 2020.3.3f1

    I always see a loading bar like this, when opening any editor window.
    upload_2021-4-13_14-46-58.png
     
    AlejMC likes this.
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I'd run some performance benchmarks unrelated to Unity to verify there isn't some general performance issue with your computer. In Unity you could profile the editor to verify there isn't some script in your project causing the lag, or otherwise see what it is busy working on, since you're not seeing it in an empty project.

    Are you sure this is a new computer? The i7-7700HQ should do ok, but it is a 2017 product.
     
  3. khollowell

    khollowell

    Joined:
    May 21, 2018
    Posts:
    3
    Thanks for the help Joe!

    How do I run the profiler against the Unity-Editor itself? I thought you could only profile the project, not the unity editor.

    I should revise my statement above.
    I'm noticing this lag in any non-empty project on this computer.
    I'm fairly confident the issue is not inside the project itself, but rather inside the unity editor, or some combination of unity editor + my computer.

    My project runs just fine, high fps inside of play mode. But the unity editor itself is extremely slow.
    For example, opening any project is slow, opening any editor window is slow, changing tabs inside any editor window is slow, moving editor windows is slow, etc.

    Are there any other tips & tricks you can find for increasing editor performance? Or getting Unity to run smoother on different machines?
     
    Last edited: Apr 13, 2021
  4. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    112
    Yeah I get the same thing for some weird reason. Editor is extremly laggy.
    I have got a 3950x, 1080GTX and 64GB of ram.
    I open unity, use URP or HDRP, and the Inspector for example is extremely slow, if I have a object selected during gameplay , then its borderline impossible to use. For example, In editor the game runs at over 300 FPS if opena inspector with some default scripts ( Rigidbody, Transform, Collider for example) I go to under 40FPS and there are huge Time spikes between frames.

    Also for some reason, I feel building/loading stuff in the inspector is incredible slow. I have had this for a while, I have even Reseted Windows and this issue always comes, at first I thought it was because I was doing HDRP and it was super expensive, but now even URP with very empty scene - One Cube and GroundPlane. I get the same stuff.

    I am pretty confident the PC is not a issue, I can game fine, even at 4K in all the titles I play confortably. So there is something really off.

    Is there any setting that conflicts with editor ? Such as Scaling etc ?
     
  5. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    More about it here
    https://forum.unity.com/threads/lots-of-busy-hold-on-etc.833644/page-8
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Sorry I didn't notice you responded earlier. At the top left of the Profiler window there is a drop down which defaults to "Playmode". Click on it and select "Editor".

    In older Editor versions, you'd access the same functionality using the "Profile Editor" button in the top center of the Profiler window. Confusingly, right next to that button there was the same drop down menu, which defaulted to "Editor" (with no "Playmode" choice), but in this case it didn't profile the Editor itself, but was the same as selecting "Playmode" in the newer versions.
     
  7. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    I have sent videos for a bug ticket regarding these things.
    The bad performance goes above and beyond pop-up windows issues and lagging interface, launching the profiler shows quite the waiting for async processes, memory allocations (sometimes several dozen MBs per mouse click), some UIElements that I didn't spent time checking out what was it about (I don't use it at all on my side for anything), etc.
    On one of the videos I recorded I would be selecting stuff and sometimes a first click would trigger and select an object AFTER the second click, overriding your intended actions and making a mess of the flow. It's borderline unusable.
    Putting the editor on Release mode doesn't seem to help.
    I'm on Mac and the input event system seems to be doubly bugged... sometimes clicking an unfolding arrow (inspector component or collapsed gameobject hierarchy) doesn't do anything unless I move the pointer at least a couple of pixels after the click.

    Hopefully raising awareness and those bugs already opened might bring back a bit of the usability in not long.
     
    lambch0p likes this.
  8. D_Cergy

    D_Cergy

    Joined:
    Feb 18, 2015
    Posts:
    35
    I also experience it in my editor, I could go as low below 20 fps in Play mode.
    I tried -force-opengl method, in my case it seems helps a little bit by +-10 fps.

    Then I found someone said it might be hardware monitoring software.
    I don't know which software doing such thing on my background process, I tried to uninstall Avira antivirus and restart.

    I got 300 fps now.
     
  9. TravisMosier

    TravisMosier

    Joined:
    Nov 5, 2021
    Posts:
    1
    Sorry to necro this post but I wanted to post my own insight and how I was able to fix it.
    We are working on a VR project and have multiple trackers all hooked up to a USB hub. I noticed in the profiler that Application.Message was running quite often and after doing a Deep Dive, I saw something (can't recall the exact phrase now) regarding USB devices. I unplugged my USB hub that was charging our Trackers and this cleared up the issue IMMENSELY.

    Again, just wanted to put this out there in case anyone else comes across this and hopefully it can save a headache or two.
     
    y4my4m likes this.
  10. jlorenzi

    jlorenzi

    Joined:
    May 2, 2021
    Posts:
    292
    I cannot thank you enough, I had the exact same problem as you and I was so confused on why it was happening.
     
  11. spilat12

    spilat12

    Joined:
    Feb 10, 2015
    Posts:
    38
    MY DUDE! I was getting random recompile times, it would be either a second or 2 minutes, it turned out it's either SteelSeries or Razer software, I turned it off and everything started flying!!
     
  12. pwalters34

    pwalters34

    Joined:
    Oct 23, 2014
    Posts:
    7
    For anyone else having super slow performance on a 4k monitor, make sure you turn off G-Sync while using Unity. That fixed all of my problems.
     
    kuuspie and Asanyth like this.
  13. ViiRusS

    ViiRusS

    Joined:
    Mar 4, 2023
    Posts:
    1
    Turning off G-Sync worked for me, Thanks!
     
  14. Asanyth

    Asanyth

    Joined:
    Mar 12, 2023
    Posts:
    3
    This also worked for me. Thank you! Even in 2023 having gsync on is still an issue.
     
  15. MustardBoy

    MustardBoy

    Joined:
    Jul 10, 2015
    Posts:
    7
    Thanks a lot, fix the bug with 2022.x and Geforce 1080 & 4080.