I think I’m losing my mind, and it all started after I enabled Deep Profiling in Profiler for the first time (and it took me quite a lot of hours to find the culprit).
So I’m working on an inventory system. In order to test it, instead of writing automation tests and such I use the good old approach of assigning various functions to key on a keyboard. These functions add various items to the inventory and sort it. It all works pretty fast, even with more than 8k of items (there will be never that much items in my game though). It worked quite well on 2019.3.0b10, but it had a nasty bug where Canvas Scaler component was messing with the Canvas and it was basically unusable. I migrated to 2019.3.0b11 and everything worked fine. I was mashing the keys to add more items to the inventory and it worked without any lags.
Then I decided to remove every possible GC allocation that is possible to remove, so I used Deep Profile function in Profiler. After that, it seems like my Editor runs in constant Deep Profile mode and I can’t turn it off.
Even if create an empty scene, place Graphy object to test the performance, and start mashing the buttons (that don’t do anything), the performance will be dropping.
I first noticed it when I started to spam the functions to add items again, and the editor started to drop frames like crazy. At first I thought that I did something wrong with inventory Lists and LINQ operations, but I started to disable these functions to find a culprit - in the end I just stopped to call these functions - and to my surprise, when I was mashing these now empty keys, the performance was still dropping. I started an investigation and this is what I found:
If I mash every key in the Unity Editor while in the Game Mode, the performance will take a hit. A lot of hits. Down to 15-20 FPS if I mash the buttons constantly. Even in the empty scenes.
If I mash key that do call functions in the scripts, in the build with Deep Profiler enabled, the game will drop frames. Mashing empty keys do nothing.
If I make a non-debug build without Profile connected, there will be just small spikes when I start to mash buttons, it doesn’t seem to lower the FPS that much (though it’s weird that mashing keys in an empty scene does something, I guess it’s because every button press is being caught by Unity or something).
So, everything tells me that the Editor now runs in a constant Deep Profile mode, where it calculates all the calls. I can’t turn it off, it seems, even if the button looks like it’s turned off.
TL;DR;
Used Deep Profiler once in the Editor, now it looks like the Editor runs in constant Deep Profile mode, which is a lot slower.
Is it something with the profiler? Or is it by design and I’m just losing it? I remember that before I moved to 2019.3.0b11, mashing the keys was never an issue in the Editor and in builds.








