Unity 2022.3.2 and above - massive performance regression in editor

Hello,

This issue has been ongoing for us for months and no version update changed anything. 2022.3.1 is the last version that is usable for us - but since we don't do ANYTHING weird and this happens is empty projects as well... time to post. This issue needs fixing as it prevents laptop users from working at all (battery and heat)

TL: DR - Newest versions of last LTS have a significant and persisting CPU usage in idle, with memory being constantly allocated. This is caused by "OpenProject.exe" process

As they say - picture is worth a thousand words. This is our project in editor mode, not play mode. Just idling. Yes - this is idling on 12 core / 24 thread CPU. And be aware - 9% is not "9%" - it's full 100% of one core

There's also a crap ton of processes being run, no idea why the are not being closed. In some test runs I was above 50 processes, with 15 console windows host etc, 15 shader compilers etc This behavior is visible in 2022.3.1f1 as well but it doesnt produce any negative fallout

The same project opened in 2022.3.1 (last one that works for us) uses 0.0% in idle, but in 2022.3.10?

9379952--1311866--upload_2023-9-30_12-20-2.png

This is also extremely visible in empty projects after adding some plugins. Basically create a new project, copy some plugins (DoTween, i2, SteamWorks, TMP... nothing out of ordinary, not our packages or our code) and observe:
- 0.0% CPU consumption in 2022.3.1
- 3-9% overall CPU consumption (again - this is a big pressure on a single CPU core) in any later LTS
- overall we see icnreased CPU usage per plugin added - this is only in 2022.3.2 and above

This is happening to all members of our team so it's not related to a specific machine or hardware configuration

Here is a screenshot from a test project - 2022.3.1 (top) vs 2022.3.10 (bottom). Plugins imported: DoTween, ParticleEffectForUGUI, Sirenix Odin, TextMeshPro, just standard things. Adding any additional plugin will just make it worse. Memory usage also being constantly increased. This is in editor mode, in console view, completely empty scene

Again - I understand that it looks like "oh, just 0.5% CPU usage, why u b*tching*. Well, frist of all - this is something that didn't happen before. Second - this idle CPU usage increases with every single new plugin or piece of code added. This is not viable for active projects and it prevents CPU from going into any low power mode, destroying battery life for laptop users

9379952--1311884--upload_2023-9-30_12-48-21.png

This actually seems to look a lot better than what we saw with 2022.3.8 but it's still clearly an issue. Here is a pic of what we saw in 2022.3.8 (I posted this in local gamedev forum)

9379952--1311887--upload_2023-9-30_13-0-31.png

And the CPU graph was also completely bonkers. Yes, just 2022.3.8 with empty project
9379952--1311890--upload_2023-9-30_13-1-37.png

9379952--1311881--upload_2023-9-30_12-32-16.png

You can look at Task Manager all day long, the only thing that really helps to analyze is the Profiler.

Put it in editor mode, enable deep profiling, and check where most of the time is spent. You may want to compare that with previous editor versions and submit a bug report.

There's been a couple reports that 2022.3 has some "EditorLoop" spikes.

You are 100% right, I omitted this detail! However… Nothing shows in profiler. Just the profiler.repaing and other typical Untiy ticks. Profiling editor in 2022.3.10 also works a bit different, unless I move my mouse the typical .Idle is not 3 ms any more but 100 ms. Not sure why, not that it changes anything

So… I really don’t know. It’s not showing up in profiler in any way. Yet I can clearly see just having the editor open in background hitting my CPU

Oh, wait… I might be up to something. Profiling in 2022.3.7 (checking this one as well) shows completely uncounted and unrepresented in main view ~240 KB of memory garbage generated per frame. Which then stops for a few seconds and shows up again. This does NOT happen in 2022.3.1

2022.3.10 also shows GC spikes that don’t correspond with anything else visible in Profiler, but with a different pattern of spikes and not continous one

9381680--1312109--upload_2023-10-1_10-47-28.png

I really don’t know what to think here

Again - editor in background, doing nothing. Increased CPU consumption preventing laptop users from gettign any battery life and unexplainable and increasing memory pressure


Once more - 2022.3.1 (top) vs 2022.3.10. Mostly empty project that I use to time tweens and particels. DoTween, TMP, Odin and ParticeEffectForUGUI are only things added. No scripts of my own

This is after running a few seconds of editor profiling, outside of playmode, outside of scene or prefab mode

9381680--1312112--upload_2023-10-1_10-51-10.png

And this is what it does to CPU usage. Hell for laptop users…

9381680--1312115--upload_2023-10-1_10-52-26.png

9381680--1312082--upload_2023-10-1_10-9-33.png
9381680--1312106--upload_2023-10-1_10-44-20.png

Note that when you profile different editor versions you have to be sure the setup is entirely the same as much as possible to be able to reliably compare the observations. This includes the open scene, what you have selected in the scene and project hierarchy, and what editor windows are open. The Inspector showing something different in both runs can have a rather large impact on the results.

Yes, obviously. And I noted multiple times that it is exactly the same setup. Project copied from one location to another (sans Library), opened once to import all assets, then closed and freshly reopend. So identical scenarios

Bump I guess?

Could you please use the Editor menu Help > Report a Bug with such a project so that we can take a look at this?

Also, I sort of doubt that this is related but there have been a couple of memory leaks that were fixed on 2022.3.10f1 but there’s also a job system work-stealing race condition bug that was introduced by a backports in 2022.3.3f1 and fixed on 2022.3.14f1.

If you for to your preferences what’s the Editor interaction Mode set to?

Took me a moment to understand what you meant by “uncounted in main view”. The Memory Usage module shows the per frame managed allocations across all threads. The CPu Usage module’s Hierarchy view only shows you one thread at a time, by default the main thread. Allocarions can happen on any thread though and might be coming from a background thread. You can flip through the threads with the drop-down next to the “Live” toggle, or switch from Hierarchy to Timeline to spot which thread has GC.Allocs. In Timeline view they are colored bright magenta and if you find one, select it and switch back to Hierarchy, the selection will carry over and flip Hierarchy view to the appropriate thread.

Also note that you may want to click the three dot menu to the far right of the “Live” button and toggle off Collapsing of Editor Only samples, as that may hide some normally unimportant allocations from view to avoid unnecessary distractions when optimizing.

You may also want to turn on Allocation Callstacks (so that you don’t need Deep Profiling in cases where that may cause too much overhead, and get a bit more info than that can give you too) to see where those allocations are coming from. That info would help greatly in determining where this regression came from.

Thanks for reply. I checked a small test project and things looked somewhat fine... until I pressed play and then stopped

First editor (with 28 processes) - 2022.3.13f1 opened and entered playmode, that's all. Second (9 processes) is 2022.3.1f1 that I opened... days ago and worked on for a few days with multiple playmode runs, script additions, removals etc etc

9467663--1330433--upload_2023-11-13_11-2-6.png

Once again upon unrolling it's filled with multiple copies of window hosts, shader compilers etc

However... Next time I opened the test project evertything looked good, performance RAM usage, everything. I even checked how per core frequencies in Ryzen Master and parking them to sleep - found no issues this time

Full project... First run + playmode once again led to massive duplication on shader compilers and window hosts. Unfortunately in this case subsequent runs dont look good nd one of the cpu cores keeps being pushed even when Unity is completely idle, empty scene opened, scene view closed and editor in background

Overall - things are definitely better but not there yet. Also - I'm starting to doubt if those 2 issues are connected. Clearly the one with processes and RAM not being cleaned properly is easier to replicate, but the CPU one is harder to pinpoint

Unfortunately I cant send our full project... but will try to get all the possible plugins and libraries out of it and see again

1 Like

I have also noticed the idle CPU usage a lot, without any scene open in Unity, both in 2021.3 and 2022.3 and with minimized Unity

One would expect zero usage if not in focus

Have you tested if version 2022.3.14f1 improved things?

Sorry about delay, I did not get any ping about new replies…

However, short answer is no. Longer - unfortunately no

Test scenario:

  • open project
  • go to first scene
  • play, end playmode
  • go back to empty scene
  • scene view is not opened

PC: Ryzen 5900x (12c/24t), 64 GB RAM

2022.3.14f1 - still idling unacceptably “hot” and at least one core is never going into lower power modes, average Unity CPU load ~3% (on 24 thread CPU, one of the cores is abused)

2022.3.1f1 → all cores parked nicely in lowest power modes. Avg cpu usage is once again 0.0-0.1%, flat cpu usage graph

Hi, i can also confirm the 3% use in that version.

Though looks like is now much better than previous versions that shoot to 24% with empty scenes not even in focus, e g. Animation tab open in main window and no rendering visible, with Unity pushed to background.

Hmm ok... @nasos_333 do you have a project you could send with a bug report?

Honestly based on tests I made before all you need to do is open a new project and add a few plugins. Every additional plugin increased idle CPU consumption

Not sure if thats still the case but worth checking. In my case a few of super popular plugins were enough (DoTween, Odin, SteamWorks etc)

There might still be local system considerations that factor in to it, which a bug report might capture.

Gonna keep bumping it as exactly nothing changed in 2022.3.21 still

Open project, minimize right after. No play mode, no scene view. 5900x, CPU power:
2022.3.1 - 2-3W
2022.3.21 - 8-10W

Which is an absolutely massive difference for laptop users…

I tried deep profiling editor - there’s nothing except for application scene tick which has roughly the same time on both versions

However… Native memory used is massively different - 1 GB in .1 vs 2.3 GB in .23

That’s how it looks in task manager. Not good

9698720--1384547--Screenshot 2024-03-13 153130.png