Search Unity

Question Editor is super slow compared to built version on Windows

Discussion in 'Editor & General Support' started by silkmoon18, Jun 4, 2023.

  1. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    My game runs at only 200 fps in editor but in build it runs at 1400 fps on my Win pc (i7-10700k, rtx 2080s, 32 gb ram). Also it has 800 fps on my M1 pro laptop. I tried adding exclusion in Windows Defender and it didn't do anything.

    I totally have no idea why it happens like that. Is there any possible reason?
     
    Last edited: Jun 4, 2023
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Yes. The editor is also running.

    Hint: the inspector window and all the other accoutrements you see are not done by "some other CPU."
     
  3. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    But I don't get why the editor has 800 fps on a weaker Mac laptop.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Me neither! Fire up the profiler and see what's taking so long.
     
  5. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    20230604132638.png This is the screenshot took on Win. It looks like the editor loop uses most of the time. The Time ms for EditorLoop on Mac is around 1.0 ms.
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    Hi, does the editor running at "only" 200fps actually hinder you in any way?
     
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Well there you go! That would go back to this:

     
  8. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    It's not. I'm curious about the significant performance differences in the Unity editor across different OS. And I'm not sure if my Windows PC has any issues, so I am trying to find out the reasons.
     
  9. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    I see... Does Unity editor on Mac always performs this better than Windows?
     
  10. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Which Mac? What hardware?

    Which Windows? What hardware? Which drivers?

    Which version of Unity?

    And this comes back to:

    I'm not trying to be evasive. I don't know. I don't know why this concept is so hard to grasp.

    And if someone posts something here saying "X platform is ALWAYS faster", they also don't know unless they obtained the hardware and software you are curious about and ran the profiler tests for you.
     
  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    Look inside the editor loop to see if anything specific takes a lot more time on Windows.
     
  12. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    Thanks for the reply. Here is the specific information.

    Unity version: 2021.3.16f1

    MacBook Pro 16 2021
    Chip: Apple M1 Pro
    RAM: 16 GB
    macOS: Ventura 13.2.1

    Windows 11
    CPU: Intel i7-10700K @ 3.80GHz
    GPU: Nvidia RTX 2080 Super
    RAM: 32.0 GB

    From the profiler I see OnGUI is taking the time. Mac has the same situation that OnGUI is the slowest, but uses less time. The project files are same.

    Windows 20230604150843.png

    Mac 20230604151517mac.jpg
     
  13. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    They are both spending the most time on OnGUI, but the Mac is using less time. Other time uses seem no different.
     
  14. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    OnGUI? Inside UIElements? Is UIElements "emulating" IMGUI stuff these days?

    I don't know but it may be as simple as some weird part of UIElements being a lot faster on a mac for one reason or another.
     
  15. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    Sorry, I am not sure what you mean by "Is UIElements "emulating" IMGUI stuff these days?". Are you refering to UnityEngine.UIElements? But I am not using UI Tookit in the project.
     
  16. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    You are not, but the editor is.
     
  17. silkmoon18

    silkmoon18

    Joined:
    Dec 13, 2020
    Posts:
    25
    Thank you!