Hi!
We are interested in collecting reproduction projects for any time the Editor unexpectedly stalls. On Windows, this shows the blocking Progress Bar Dialog.
To gather this data automatically, we are adding analytics information to report the causes for all stalls. However, until that is ready, if you would like us to investigate/fix any specific scenarios, this is a call for bug reports!
There are a few “expected” stalls, such as making a player build, importing assets, entering playmode, which we don’t want to focus on here. There are ongoing efforts to improve all those kinds of things separately. I want to focus on other cases in this thread, where you feel that Unity shouldn’t be making you wait.
If you’d like to send us a bug report, and are able to submit a repro project to go with it, we would love to take a look at them.
Put a link to this forum thread in the report, so QA know why you are submitting it, and then reply below with the case number, so we can keep track of these reports.
Also, the Windows Editor has a Diagnostic Switch in Unity 2021.2, which writes out information about any stalls to Logs/stalls.log in the project folder. To enable that, go to Editor/Preferences/Diagnostic Switches, and enable Editor/WriteOutStallStackTraces.
In the diagnostics menu, you will find three different settings.
- WriteOutStallStackTraces: Check this one to write out profiling data about stalls in general to a logfile (you can find that in your project folder in Logs/stalls.log)
- WriteOutStallStackTracesIntervalSeconds: This controls how long we wait between capturing profiling data. The default value is once per second. This works fine for long stalls (e.g. you see the progress bar for many minutes). You can reduce this to lower values (down to 0.1 or 0.01 in extreme cases) for shorter stalls like 10s or 15s.
- WriteOutStallStackTracesThresholdSeconds: This controls how long the editor needs to be stalling before we start to write out any data at all. The default value is 10s. To capture shorter stalls, you will have to reduce this value.
Enabling this diagnostic switch can impact the editor performance and stability, so we recommend turning it off again when you have finished using it.
You can copy a particular stall out of the log file into its own file, and then open it in https://www.speedscope.app/ to view it, but, more importantly for us, if you attach it to the bug report, it will give us more information.
And finally, if it’s not possible to send a repro project, please do still send the stall report as this provides us with valuable data.
Thanks!