Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Official Editor Progress Bar stalls (request for bug reports)

Discussion in 'Editor & General Support' started by richardkettlewell, Jul 8, 2021.

  1. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,063
    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.
    1. 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)
    2. 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.
    3. 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!
     
  2. OtakuD

    OtakuD

    Joined:
    Apr 24, 2014
    Posts:
    48
    So I've been trying to find the source of the slowdown as best I can and found this post which allows to somewhat debug 2021.1 instead of the beta via command line.

    In the logs I find the following items taking the most time each time I change a file and recompile, any info as what they are and what could cause this? I've seen values from 6k-37kms on compile even though I've restarted Unity etc. so importing should be done?

    ImportAndPostprocessOutOfDateAssets: 37871.933ms (37825.510ms without children)

    Code (CSharp):
    1. RefreshProfiler: Total: 6900.726ms
    2.     InvokeBeforeRefreshCallbacks: 0.755ms
    3.     ApplyChangesToAssetFolders: 0.067ms
    4.     Scan: 5.730ms
    5.     OnSourceAssetsModified: 0.000ms
    6.     InitializeImportedAssetsSnapshot: 20.578ms
    7.     GetAllGuidsForCategorization: 1.733ms
    8.     CategorizeAssets: 181.699ms
    9.     ImportAndPostprocessOutOfDateAssets: 6659.925ms (6610.990ms without children)
    10.         PostProcessAllAssets: 0.002ms
    11.         EnsureUptoDateAssetsAreRegisteredWithGuidPM: 4.299ms
    12.         InitializingProgressBar: 0.000ms
    13.         PostProcessAllAssetNotificationsAddChangedAssets: 1.749ms
    14.         OnDemandSchedulerStart: 1.030ms
    15.         RestoreLoadedAssetsState: 22.890ms
    16.     UpdateImportedAssetsSnapshot: 18.964ms
    17.     ReloadSourceAssets: 16.511ms
    18.     UnloadImportedAssets: 1.452ms
    19.     Hotreload: 2.891ms
    20.     FixTempGuids: 0.006ms
    21.     GatherAllCurrentPrimaryArtifactRevisions: 0.748ms
    22.     UnloadStreamsBegin: 0.118ms
    23.     LoadedImportedAssetsSnapshotReleaseGCHandles: 1.464ms
    24.     GetLoadedSourceAssetsSnapshot: 27.663ms
    25.     PersistCurrentRevisions: 0.760ms
    26.     UnloadStreamsEnd: 0.096ms
    27.     GenerateScriptTypeHashes: 11.414ms
    28.     Untracked: -21.468ms
    29. [MODES] ModeService[default].RefreshMenus
    30. [MODES] ModeService[default].UpdateModeMenus
    Code (CSharp):
    1. RefreshProfiler: Total: 31210.297ms
    2.     InvokeBeforeRefreshCallbacks: 0.745ms
    3.     ApplyChangesToAssetFolders: 0.068ms
    4.     Scan: 5.545ms
    5.     OnSourceAssetsModified: 0.001ms
    6.     InitializeImportedAssetsSnapshot: 20.777ms
    7.     GetAllGuidsForCategorization: 2.057ms
    8.     CategorizeAssets: 197.224ms
    9.     ImportAndPostprocessOutOfDateAssets: 30953.849ms (30902.882ms without children)
    10.         PostProcessAllAssets: 0.002ms
    11.         EnsureUptoDateAssetsAreRegisteredWithGuidPM: 4.338ms
    12.         InitializingProgressBar: 0.001ms
    13.         PostProcessAllAssetNotificationsAddChangedAssets: 1.790ms
    14.         OnDemandSchedulerStart: 1.286ms
    15.         RestoreLoadedAssetsState: 23.316ms
    16.     UpdateImportedAssetsSnapshot: 20.234ms
    17.     ReloadSourceAssets: 18.541ms
    18.     UnloadImportedAssets: 1.511ms
    19.     Hotreload: 2.764ms
    20.     FixTempGuids: 0.008ms
    21.     GatherAllCurrentPrimaryArtifactRevisions: 0.702ms
    22.     UnloadStreamsBegin: 0.097ms
    23.     LoadedImportedAssetsSnapshotReleaseGCHandles: 1.478ms
    24.     GetLoadedSourceAssetsSnapshot: 28.292ms
    25.     PersistCurrentRevisions: 0.784ms
    26.     UnloadStreamsEnd: 0.089ms
    27.     GenerateScriptTypeHashes: 12.164ms
    28.     Untracked: -24.235ms
    29. [MODES] ModeService[default].RefreshMenus
    30. [MODES] ModeService[default].UpdateModeMenus
     
    Last edited: Jul 14, 2021
    m0guz likes this.
  3. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    841
    I have had/have this issue of ImportAndPostprocessOutOfDateAssets as posted by me in this thread.

    https://forum.unity.com/threads/wha...so-long-each-time-i-open-the-project.1076038/

    That same project after showing that issue of low loading time, later started to have the UI loading bar block.

    This may be related with this thread issue as watching the logs after the UI hangs up with the loading bar the same ImportAndPostprocessOutOfDateAssets is listed as taking a long time to complete.

    My guess is that unity thinks the files had been changed and will import them again which blocks the editor till the process is complete. More files you have worse it gets. More third party assets you have with a lot of textures, models, complex animations, longer it takes.
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,951
    Any chance of backporting that to 2020 LTS? I'm seeing some intermittent stalls when opening Quick Search, but we're on 2020, so I don't have access to the switch.
     
    billw2011, KAJed, Flavelius and 3 others like this.
  5. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    148
    Yeah would be great to have this backported to 2020 LTS, I encounter this issue every day so that will be easy to report, but we are not going to update our project to 2021 before a while, and it would not be a good test as we may not have the same issue on 2021.
     
    billw2011 likes this.
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,608
    The biggest stall i have seen so far is related to shader compilation, when i enable the async parallel compilation i see an exponential increase in compile time, eg. 2 minutes versus 3-4 secs.

    This is obviously some extremely serious bug in there, other users not see the issue though, so cant tell exactly when and how it happens.

    For my case was like a revelation when turned off the feature and from waiting minutes for a single tiny change, was reduced to seconds.

    I noticed this option to turn it off is not available in later Unity version and wondering if the shader baking i saw today in my HDRP project could be done in less than the 2 hours it took if this option was turned off.

    Please add back the ability to turn Off the async shader compilation in all Unity versions, since it appears to be extremely buggy in some cases.
     
    Last edited: Aug 5, 2021
  7. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    233
    Case number is 1355893, on Unity 2021.1.16 on Windows 10. I'm seeing this stall damn near every time I open something up in the inspector, especially (but not exclusively!) when I use Odin attributes.

    Whatever's happening, it's happening in
    InspectorWindow.Repaint
    .

    This is incredibly frustrating; it's preventing me from getting any work done. It's almost a blocker. It's taking me over a minute just to drag some assets from the Project view into an array.

    EDIT: Oh thank God, they reproduced it. I'm not crazy!
     
    Last edited: Aug 6, 2021
  8. s_schoener

    s_schoener

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    78
    @JesseSTG - this is exactly the kind of report that we are looking for. I was able to reproduce the stall: The main culprit here is the addressables package. I don't have any ETA on a fix yet but I've alerted the team. Thanks again, and sorry for the inconvenience - I know it sucks when Unity isn't responsive :(
     
  9. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    841
    hope this is the time! maybe finally it will be fixed :D
     
  10. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    233
    Really? Huh. Of all things. I'm actually curious, can you elaborate? (Feel free to go into as much detail as you'd like.)

    Thank you very much!
     
  11. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    29,567
    It's actually a bit worse than that because when you are in the flow it completely disrupts you, knocking productivity to the ground. It's absolutely miserable how slow 2021 has become, and that is even with TINY projects, projects with a total of 20 to 30 files!!

    I am sure your teams will sort it out but just know that virtually every developer I know, if this was their first impression of using Unity, would absolutely never consider using it again. This lagginess has got to be seriously impacting your user base and I'm not sure your analytics are showing it.
     
  12. djdanlib

    djdanlib

    Joined:
    Jan 14, 2017
    Posts:
    15
    I have a theory that when I have 2 monitors on, save a project, quit, and come back to it later with only 1 monitor, the editor stalls forever when starting up and has to be killed, and for some reason it starts fine the next time after that. It doesn't seem to happen if I have both on prior to starting the editor, or if I save it with only 1 on. Not sure if it's total coincidence though, I don't have much time to test this.
     
  13. Hannibal_Leo

    Hannibal_Leo

    Joined:
    Nov 5, 2012
    Posts:
    492
    Here is a very easy to reproduce one:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class LagTest : MonoBehaviour
    4. {
    5.     public Vector3 a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
    6. }
    Create this script in an empty project.
    Create any Object (Empty, Cube, whatevery you like) in a scene.
    Add the script 20 Times to the Object in the scene.

    Now change a value in any of the 20 scripts or move the object around.

    Result:


    If this is a player character, which is constantly moving, you can't play the game while the inspector is open, you have to close it or hide it in order to be able to play at a stable framerate.

    Possible Solution: Give us the option to fully switch to UI Elements in the Editor, render everything with UI Elements. I've seen it in EditorDeveloperMode.Internal, it is just a bool to set, might not fully work, but I am willing to take the risk.

    (Fun Fact, the Profiler is also rendering using IMGUI, which probably makes it about 5000% slower than it would be with UI Elements)
     
    Ruchir and s_schoener like this.
  14. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    841
    but the above is not related with the bug where unity shows a loading bar for 10+ minutes or more.
     
  15. s_schoener

    s_schoener

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    78
    There is no "it will be fixed", unfortunately. As stated many times before, there is no "single thing" that makes Unity slow. The progress bar pops up whenever the main thread is blocked for longer than a certain time (usually 10s). This can be caused by practically anything, including my code, your code, the code in one of the many asset store packages you use, any Unity package, any Unity core code, the possibilities are literally endless. The only thing that makes it better is to (a) fix all instances as they come up, (b) add more testing on scale, and (c) make it more discoverable when user code causes this problem, which are all things that we are actively doing. Given the sheer size of Unity and the number of different combinations of packages and the fact that user code can introduce all of these stalls as well, this is a truly herculean task and it will never be done. Though good bug reports like the one from @JesseSTG accelerate progress _a lot_ :)

    As someone who uses Unity every day in their work and then every day in their private life to build their own games, believe me: I know how slow things are. My job right now is literally to look at all of the cases that are slow, so I see it all :p I know it doesn't help you right now, but you have my sincere empathy for how much it sucks when the editor is slow or stalls :(

    Fun fact: I ran into that same issue on my home project. It's actually been improved significantly in 2021.2.0a14 (and yours truly recently added a performance test to make sure nobody is ever going to make that slow again). Also, just switching everything to UI Toolkit is probably going to introduce a whole truckload of new problems, which is presumably why the responsible team is holding off... and I'm pretty sure they'd like nothing more than to get rid of ImGUI ;)

    You're welcome! So I haven't looked into all of the details because I looked into it afterhours on a Friday night, but the short summary is this: The addressables package draws a custom header in the inspector. That header is very slow to draw in your project because it is enumerating some assets for UI purposes. I'll take another look on Monday and see if there is any easy workaround for you locally. Thanks again for your report, that's the good stuff we're looking for.
     
    glenneroo, Energy0124, mgear and 5 others like this.
  16. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,063
    Hi,

    Thanks for the feedback!

    I've passed this log along to the relevant team who are going to look at whether we can add more detail as to which part of that step is taking the time.

    In the meantime, if you are able to submit a bug report, I could look at your specific situation.
     
  17. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    If you can monitor stalls in this manner, and show a popup at this time, couldn't you add a button to the pop up that says "wanna let us do a trace of what's blocking the thread?" and then do that if the user says "YES!' and send it to somewhere inside Unity that's relevant?

    This problem is legion, so time to start thinking about how to get ALL the data you can about what's causing it?
     
  18. s_schoener

    s_schoener

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    78
    @april_4_short: I like the idea. I'll see what I can do. We went through similar ideas but the stack tracing code was a bit flaky before I introduced that diagnostic flag (see OP), so I think you are right that this is an avenue worth exploring again. Thanks!
     
    Last edited: Aug 9, 2021
  19. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    233
    The public ticket doesn't reproduce the issue with Addressables 1.18.11, so I downgraded to that for a while. Will it work? I dunno; I have several things to do IRL before I can try it out.
     
  20. courtrick

    courtrick

    Joined:
    May 14, 2018
    Posts:
    2
    Currently I have been waiting for over 10 minutes at the time of writing with a progress bar that simply says EditorApplication.playModeStateChanged. To say that this is annoying is an understatement that frankly makes me wonder if something is wrong on my pc. I'm looking forward to at least having a way to improve this in the future.
     
    Bdelcast and april_4_short like this.
  21. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    841
    I think the dev team still don't understand what people are posting here about. Is not about unity being "slow"

    The issue is the editor will randomly show the loading bar for 10 minutes and more at the time, while doing nothing, it doesn't process some heavy operation or something that takes time, it just waits for something internally, then after minutes ( 8, 10 or more minutes) pass will unfreeze, and you can continue to work till the next time it happens which usually is 2 or 3 times an hour.

    So again, the user did not select a heavy operation (like lighting bake or similar) the user will just click in the editor window, or select a prefab, or change a value in the properties panel, stuff like this.

    then boom, unity will show the loading bar for 10 (around) minutes and will wait for some internal click that will unfreeze the editor.

    This will not happen with all projects BUT once it starts happening that project is busted. On the same computer different projects will work fine at least till they may or may not get hit by this bug.

    From my experience unity will work with that project for days with no issue before this loading bar happens. And no changes were made to the project that justify the issue (the same assets, scripts, ecc, are present nothing added that could break)

    Said this, I understand perfectly that is hard to pin point what is the issue because I removed assets, added assets, updated packages, ecc to understand what could be. If something fix it. I think other users did this too.

    One thing I suggest is looking into how unity editor passes events inside the unity itself (maybe related with unity UI), maybe something breaks and the event are not sent or received correctly.

    Second thing I suggest that maybe unity is trying to re-import or check all assets inside the project because it thinks that they are out of date or that the assets had been changed.
     
    billw2011, amirheb and april_4_short like this.
  22. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    There definitely does seem to be something wrong in the UI. I do a lot of rearranging, which is fine, until it isn't. Then all hell breaks loose, and all caches and everything needs to be purged to get a responsive Unity Editor back. Visual failings in the Inspector are the first signs this is about to happen. The Add Component button being stuck right at the bottom the very first sign.
     
  23. OtakuD

    OtakuD

    Joined:
    Apr 24, 2014
    Posts:
    48
    This is certainly it, adding and removing the exact same comment from my project over and over can produce anywhere from 13sec to 50secs of waiting each time, no consistency. Also having my project locked by the window is crazy, I can't even navigate to the next file I want to work on or do anything while it does all this "Holding on" which is really terrible for keeping workflow alive.
     
  24. Hannibal_Leo

    Hannibal_Leo

    Joined:
    Nov 5, 2012
    Posts:
    492
    Usually I have console warnings disabled so I can't tell if this happend in the past the same way, but I just hit save and had to wait 1.5min, which is quite common by now. Every fifth or thenth time I hit save, I have to wait about 90seconds or more.

    Now, because I enabled console warnings, I got this message:
    Importer(NativeFormatImporter) generated inconsistent result for asset(guid:d40210d5ceb6a31458fb31aaaae01411) "Assets/0 Systems/0 Classes/Enemy/BehaviourTrees/Resources/BT_VariableDB.asset"


    I didn't modify our
    BT_VariableDB.asset
    , I didn't even look at it. I got 3 other warnings of this type. I get them almost every single time I hit save but sometimes it takes forever.
    As this is the only thing that pops up in the console, maybe that's the cause of this lag?

    I am just saving the same scenes over and over, modifying prefabs, which have absolutely no connection to the mentioned Database Assets, so I would expect the saving to be consistent.
    Why does it sometimes take 1.5min to save the very same thing as before, when it just took 5 seconds?
    This is so confusing, I can't see any consistency in this behaviour, it doesn't matter if I save scenes, assets, duplicate, it can happen at any time, at any operation.
     
  25. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    517
    +YES ! ! :D

    Also if asset producers could have a similar pop up added into their own tools, that might be helpful in tracing down bugs faster?
     
  26. FuriousEX

    FuriousEX

    Joined:
    Mar 13, 2014
    Posts:
    45
    Similar problem here - been happening for a while now- with very small changes to scriptable objects, every 5-10 saves it stalls for 90+ seconds. Seems even more often when duplicating scriptable objects or prefabs than saving.

    2020.3.4f1, windows, perforce VC

    edit: noticing it often when in prefab editing mode, and making changes to different prefab/scriptable objects
     
    Last edited: Sep 9, 2021
  27. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    517
    Did anyone on the Unity team, figure out why there's a 2-3 second delay on everything?

    The amount of times I exit \ enter play mode followed by the 2-3 second pause... Must add up to 30 minutes or so after a 16 hr work day :oops:

    Is it me or does Unity go into sleep mode when it's not in focus. (This includes entering play mode) .. Thus the 2-3 second application.Tick after every action.
     
    Last edited: Sep 11, 2021
    glenneroo, kayroice and stuksgens like this.
  28. Hannibal_Leo

    Hannibal_Leo

    Joined:
    Nov 5, 2012
    Posts:
    492
    I don't think it's perforce because we use GIT.

    Now I have a theory, can you share how big in MB or GB your biggest scene in your project is?

    Does it look like this?
    upload_2021-9-10_2-58-38.png

    Or do you have any other scriptableObject, Prefab or anything that has lots and lots of small data?
    Giant lists of integers, Vector3s, any Mesh saved inside unity or a texture saved in a byte[] collection?

    Because I think it has to do with the Undo System, specifically the Undo System trying to compare big files byte by byte.
    I don't know how I could test it. I tried to reproduce it but it didn't work out. I saved images as byte arrays for a custom tool and the undo function led to long stalls. And when you duplicate (or save?), undos are generated.
     
  29. FuriousEX

    FuriousEX

    Joined:
    Mar 13, 2014
    Posts:
    45
    Our scenes are pretty small (8-12MB). Some of them are serialized in binary, like what you are seeing there @Hannibal_Leo and some are text. Asset Serialization mode is set to Force Text.

    I will keep an eye open and see if the stalls happen in the context of both types of scenes.

    I see the stalls when working with small data - no long arrays or lists.

    Not sure if it's relevant but I usually run with Domain Reloading off.
     
  30. Hannibal_Leo

    Hannibal_Leo

    Joined:
    Nov 5, 2012
    Posts:
    492
    This isn't really binary, it's HEX, I think .. which is strange because this is actually an integer array of mesh indices (definition of which 3 points are a triangle). We also have "Force Text" set in the serialization settings.

    And we also have "Domain Reloading" and "Scene Reloading" turned off.

    Yes, stalls happen when working with small objects, but I think the big objects are updated too, for some reason .. or MAYBE it happens when an Undo Entry is cleared?
    Undo has a limit, right? When you work on something big, then on lots of small stuff and the big undos get cleared from the list, maybe that produces a lot of garbage, leading to massive stalls?

    It's just a theory. Because in small projects (game jams) this never happens. It only happens once the project gets bigger. So it has to do with some assets.
    I also checked for damaged assets, prefabs, missing GUIDs and so on, as far as I can tell, our assets & scenes are all OK, they don't have any issues I can find.

    Now I am waiting for V2021.2 to release, so I can use the Asset-Import-Editor that shows which assets get imported at which operation.

    (also it seems to happen way more often to my colleague who is level designer)
     
  31. stuksgens

    stuksgens

    Joined:
    Feb 21, 2017
    Posts:
    172
    When this problem was first pointed out, I remember seeing some threads pointing out the probuilder as possibly responsible for this delay in unity.o_O
    As far as I know, this has already been fixed in a later version of the probuilder, but could it have been a new regression? it would be good to ask the probuilder team if they are aware of this, or if the probuilder might be causing this
     
  32. stuksgens

    stuksgens

    Joined:
    Feb 21, 2017
    Posts:
    172
    One important point to note (all indications are that) the new 2022.1 Alpha does not have this workflow problem. it is as if the problem never existed.:confused:

    But the problem still persists in 2021.2 Beta
     
  33. Hannibal_Leo

    Hannibal_Leo

    Joined:
    Nov 5, 2012
    Posts:
    492
    Changelog 2022.1 Alpha:
    Undo System: Explorable undo history UI.

    Maybe it really had to do with the undo system (in combination with meshes saved to scenes or otherwise small data)? IDK. Now I just have to wait about half a year to use 2022.1 and the problem will be gone xD Good to know xD
     
    stuksgens likes this.
  34. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    517

    I suspect also the new search tool contributes to slower performance. I get this process every time I exit \ enter play as well as exit \ enter prefab editting.

    Screenshot 2021-09-12 174146.jpg
     
  35. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    380

    what versions removed this " turn Off the async shader compilation" ?
    that would be horrible

    Note internally in shader graph when they compile shaders they also turn this off
    for unity to remove this option is not good!!!!
     
  36. FuriousEX

    FuriousEX

    Joined:
    Mar 13, 2014
    Posts:
    45
    Today I started getting it in editor before I pressed play at all - makes me think Domain Reloading is unrelated. I haven't worked (directly) on anything with big data sets today.

    When the stall happens I see CPU use and memory spike on an editor sub-process; at the tail end of the stall there are big disk writes (probably several hundred MB). I didn't expect the disk writes - almost like Unity is reserializing a bunch of stuff.
     
    Last edited: Sep 13, 2021
  37. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    841
    if unity is injecting new text/content in the assets then obviously it detects that assets had been changed and tries to re-import them.

    then it gets into this vicious cycle of injecting stuff then re-importing.

    explains why it doesn't do this with all projects and once it starts doing it, the project is busted.
     
    stuksgens likes this.
  38. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    893
    Application.EnterPlayMode for infinity on around every 15-20th Playmode start on 2020.3.17f1. It's quite frustrating and inconsistently random, only killing unity via taskmanager ends it.
     
    Jes28 likes this.
  39. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    517
    Case 1367176 <-- Hope it helps.

    Screenshot 2021-09-20 133523.jpg

    Every interaction causes Unity to pause for 3-16 seconds.
    - Load a new Scene - wait for Application.Tick for 3 - 16 seconds
    - Enter Play Mode - wait for Application.Tick for 3 - 16 seconds
    - Exit Play Mode - wait for Application.Tick for 3 - 16 seconds
    - Edit a VS script - return to Unity and wait for Application.Tick for 3 - 16 seconds
    - Import a 3d Blender model - return to Unity and wait for Application.Tick for 3 - 16 seconds
    - Fix a texture in Gimp - return to Unity and wait for Application.Tick for 3 - 16 seconds
    - Check email - return to Unity and wait for Application.Tick for 3 - 16 seconds
     
    Bdelcast and richardkettlewell like this.
  40. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,089
    Hi,

    i am confused... i'm using Unity 2021.1.17f1 for quite some time and it had this issue where it always did show Application.Tick, Application.Message bars and stuff... the editor wouldn't even toggle fullscreen mode...

    For some reason this just got fixed after i did "Reset All Layouts" and after this i did close the Console Window... it doesn't seem normal closing the Console Window to be related to getting this fixed, but i previously did reset the Unity Layouts many times ( not sure if i've done it in 21.1.17f1 though) !

    The editor for me now can be really quickly maximized and minimized even if in play mode ( like normal )... also these annoying messages are gone and the editor enters and exits play mode a bit faster without counting those extra seconds... So i don't know what actually did fix the issue but i though this might give some idea to someone !
     
    Last edited: Sep 22, 2021
    glenneroo, andreiagmu and stuksgens like this.
  41. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    517
    Unity 2021.1.19f1

    WOW! :eek::eek::eek::eek::eek::eek::eek::eek::eek::eek::eek:

    I can confirm this does help. As of this message, resetting the layout has removed the application.Tick pop ups, or least significantly reduced their appearance. I can notice a 0.15f second pop up, but then it's gone.

    Great hack!

    Maybe submit a bug report with this forum thread. This way the bug QA team can cross check with the UX Editor team . :)
     
    andreiagmu and stuksgens like this.
  42. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,951
    Yeah, Unity can leak editor windows.

    What happens then is that you have editor windows that are doing work (OnEnable, other callbacks, etc.), but are not actually visible. These windows will get saved to your current layout when closing the editor, and since they can't be closed they will never go away unless you reset the layout.

    I have no idea how to repro it or what causes it, but we've seen it quite a few times over the years from errors from the OnEnables of windows that are not visible anywhere.
     
  43. s_schoener

    s_schoener

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    78
    @CrowaL - thanks. Your bug report unfortunately does not include your project, so we cannot reproduce any of the problems you are seeing. If you could please file a bug report that includes your project directory (ideally with your Library folder), we'll be able to help you.
     
    stuksgens likes this.
  44. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    517
    Sorry about that. Once application.Tick starts to rear it's head again, I'll send another report. It's already starting to show up again after a day from reset.

    I'll submit a new case with the Library folder when things really become bogged down. It's 23GB though, so I'm not sure if the upload will succeed. o_O
     
    stuksgens and richardkettlewell like this.
  45. djfreed

    djfreed

    Joined:
    Dec 15, 2016
    Posts:
    1
    Are these kinds of stalls just happening in 2020+ or has this been seen in 2019 as well? My team has not moved from 2019 LTS to 2020 LTS yet due to concerns that these stalls are unique to 2020+
     
  46. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    841
    till you get an official answer from unity I suggest you stay away.

    From the way unity team dealt with this issue this year I suspect is a deep problem embedded in the editor, both the 2020 and the 2021 versions, that may be too hard or disruptive to be fixed.

    Maybe, and I hope this is true, they will try to fix this in the 2022 version without disclosing what happened

    edit: just to be clear, you MAY or MAY NOT get this issue but the real risk is that you get the issue AFTER you invest time in setting up the project and resources. This basically will tangle you like a deep web and bring your development to a halt.

    And you end up like me scrapping one year of work.

    Some people keep bringing up version control. If you get this issue then what? you roll back the project to two weeks in the past? Losing all the changes that you did for two weeks?

    And then what? Work for two weeks and maybe get the bug again?
     
  47. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    893
    For me it's not weeks, but even losing hours of important work when using collaborate is just frustrating and costs money, so if you're not pressed on time you may get away with using git and rolling back every so often. But when you're planning to use collaborate i suggest you don't upgrade, it stalls even more.
     
  48. FuriousEX

    FuriousEX

    Joined:
    Mar 13, 2014
    Posts:
    45
    The stalls I get aren't that bad - they will go away for a bit after an editor restart. It's annoying and counter-productive but not the end of the project.

    Bad version control plugins/server performance will cause stalls too - not these specific stalls apparently though. Personally mentioned just in case it overlapped with other people's configurations.
     
  49. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,089
    I've been talking in forums since Unity 2017 that the editor has some issues with layouts ( may be ) or some editor windows getting bugged out in the back ground or something ( not sure what exactly happens )

    Why i'm saying this is that i just noticed something...
    For a long time Unity editor just starts to stutter and you get spikes in "Profile"... currently i get Chrome playing You Tube music in the background and while this it is playing the editor stutters and stops when i stop You Tube player, but guess what, all the stuttering is gone when i again Reset Editor Layout...

    So now i understand that all the annoying issues with stuttering i had before are may be based on the editor itself and how it manages editor windows or something and not on the some heavy usual work that it is doing in the back ground...

    I've done something that's still annoying but helps a lot... I've created the unity layout i wanted and saved it as a preset and then simply click the preset when the editor bugs out and all issues are gone...

    It's not that this will help with the issue in general but i'm posting it just to note that most of the issues i had are apparently related to editor windows and how they are managed or something !
     
    Last edited: Jul 18, 2022
    glenneroo, OCASM and Lars-Steenhoff like this.
  50. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    380
    I am experiencing stalls of the editor very consistently today, while I never had them before (in the last 7 years).
    I just modified a bit an UI, but honestly it was nearly nothing compared to what I have done before.
    The only thing a bit different is that I have opened the frame debugger quite a lot these last few hours, and that's a bit new, I don't use it usually.

    The editor is stuck at 'Reload Script Assemblies'.
    In the editor log these 2 lines are repeated indefinitely (well, I just waited 10mn, but reloading the assemblies usually takes 2s):
    The only workaround I have found is to kill the Editor process and restart it.
    I am using Windows 10 and Unity 2020.2.4.
     
unityunity