Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Lots of busy... Hold on.... etc?

Discussion in '2020.1 Beta' started by hippocoder, Feb 22, 2020.

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Just wondered if these will go away? present in 23 and 24, or if it's something I'm being incredibly naughty about in this relatively slim project...
     
    TerraUnity, dugurca, Ony and 8 others like this.
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's intolerable, I guess it might be collab or something, will try rolling back.
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,754
    I’m getting them too (and also using Collab, but I’m not convinced that’s the reason)
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Are you talking about the "overhauled" progressbar that displays "busy for" now:

    upload_2020-2-22_17-15-55.png

    I like the idea of displaying progress! I mean, I prefer seeing an indicator that Unity is busy, rather than an editor freeze with no feedback.

    That being said, I would of course even more prefer if Unity would be fast, so I don't have to stare at "busy for" and could actually work.

    PS: I see this progressbar with "busy for" for a lot of things in Unity, like opening project, opening scene, enter playmode, etc. That's a nice improvement for me :)

    upload_2020-2-22_17-32-9.png

    I would also prefer if it display "Please wait" rather than "Hold on", but I guess they have way more important things to do :p

    EDIT: A nice improvement would be if that "Hold on" progressbar would not appear immediately, but after 500ms. That would workaround issues where things are fast, so you don't see a progessbar for operations that finish in a split-second, thus being easier on the eye.
     
    Last edited: Feb 22, 2020
    CloudyVR, Ony, Emperatrixxx and 9 others like this.
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    i'd hope that it can be toggled off..

    when working with some small test projects it gets annoying to see that box flashing for 0.01s every time..
    and its so fast that you cannot read anything there anyways..

    also if you alt tab away after you press play, then whole unity starts blinking in taskbar..
     
    rimb, Burkard and hippocoder like this.
  6. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Agreed.

    I had the same problem in several tools I wrote too. My solution to this problem was to display the progressbar only if the operation lasts more than 500ms. That removed all the progressbar flashes and only showed progress for operations that actually took longer, where showing progress is then useful.

    Perhaps Unity could implement this too.
     
    Marc-Saubion, mjc33 and hippocoder like this.
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    But these things... weren't taking up time before at all.

    Basically I stopwatch timed it from the earlier version and this stuff is additional time added for 0 reason. It's much slower/more disruptive so I had to post.

    I mean even switching to another window (0 saving, 0 compiling), it pops up this stuff and makes me wait for 5 sec where before, zero wait.

    Honestly, if it goes live like this, then 2019.3 LTS will do I think... hoping its just other packages or something causing it.
     
    Ony, Chrisx97, sniffle63 and 17 others like this.
  8. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    While liking the progress bar addition I've noticed more waiting around too
     
    Chrisx97 and sniffle63 like this.
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It kicks in whenever anything happens. Even clicking an object will trigger it sometimes, it's a bloody nuisance. It's probably automatic, and if so I'm wondering why. I'd love to know why in an age of multi threading, this thing would happily block things that weren't blocked before.

    Don't see a single thing I like, or even need to know. I mean getting used to a cog or discreet progress bar in corner is way preferable.
     
    Ony, Razputin, Immu and 8 others like this.
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,754
    I mean, I don't know. What am I supposed to get out of that?

    I now know that Unity spends a few seconds randomly in Application.Tick , Application.Messages and SceneTracker, and also I used to say that "Checking for Changes" took a couple of minutes, but now I know it's over 3 minutes.

    And with all that information I now also know that in the time it takes for my project to open in 2020, I can open and close the same project in Unity 4.x around 100 times, which feels... ...

    What am I supposed to do with that information?

    If I was any more negatively predisposed against Unity I would say it's some sort of bizarre power move ("LOOK WE ARE MAKING YOU WAIT AND THERE IS NOTHING YOU CAN DO, HAHA")
     
    Ony, DavidSof, Neonage and 1 other person like this.
  11. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    395
    I have the same issue.
    It's bad on 23, but it got unusable on 24 so I rolled back to 23 for now.
    Using AssetDatabase.SaveAssets() after dirtying a single tiny ScriptableObject takes almost 20s on 24, and takes about 10 on 23. Looking at the profiler in 23, it goes up to 2.5GB RAM (!) to run SaveAssets()

    Before, it was nearly instant. Something definitely happened in recent versions.

    ---

    Found the culprit for my case: QuickSearch 1.6+.
    1.5.2 is fine, but 1.6 is sorting a very large array or list and is causing all this. Will post on its threat soon.
     
    Last edited: Feb 23, 2020
  12. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    That's a good point, I would prefer it too.

    What I get out of it is that I can see that Unity didn't freeze, but is still doing stuff. I often had the issue: "Alright Unity, you locked up for a minute already, you dead?".

    Probably just a bug.

    If it's related to the progressbar and I have to guess, I would say the progressbar is updated every iteration of work, rather than in timed intervals. I wrote a blog-post how updating a progressbar often makes your program significantly slower and show solutions that don't suffer this issue:
    http://web.archive.org/web/20160804220745/http://console-dev.de/?p=447
     
    Last edited: Feb 23, 2020
    Gen_Scorpius likes this.
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,754
    There's no bug. Or if the're a bug, it's like for an extra 30% difference in slowness.

    I've gone from being able to open my project and do work in a few seconds with Unity 4.x and Dropbox to a few minutes with Unity 20XX and Collab.

    But in any case, we're getting off topic, since these are not specific to 2020.

    I maintain that unless I can do something about it, letting me know (in a shortly flashing panel that I may or may not have time to read), that Unity is wasting time for Application.Messages is absolutely useless.
     
    Steviebops and laurentlavigne like this.
  14. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    It would be better if the progress bar is part of the editor and not a popup.
     
  15. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    I've added it. It's this item in the release notes: "Editor: Windows Editor pops up a progress indicator automatically, whenever the editor is not responsive for longer than a second".

    Now, if you see it popping up "immediately", that sounds wrong. Would love a repro.

    It already only shows up after 1000ms of non-responsiveness. But absolutely, if you see it popping up faster -- would love a repro.

    Please file a bug (maybe some package makes "everything" slow down? etc.). In all our testing we never saw that situation -- the progress dialog itself is not making things "slower" (it runs on another thread with very little work), and only kicks in after the editor is not responsive for >1s. If doing "anything" in the editor makes it not responsive, well we'd better find out why it's not responsive; the progress dialog just tells you "hey I'm not responsive" but I highly doubt it's the culprit.
     
  16. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,754
    Well, if it's non-responsive for 1.1sec the dialogue will appear for 0.1sec, making it seem to us like it's flashing and popping in and out.

    So the question is, why is the Unity editor non responsive for longer than 1 second so often.
     
    Hello258, Ruslank100, Neonage and 3 others like this.
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    We have objects that rebuild the mesh and this takes no time at all. We also use raycastcommand jobs from time to time.. I don't know if it's relevant or not.

    Without this feature there is 0 delays.

    With this feature we are being delayed! big time. I think you should make it 100% optional so I can entirely disable it. "Unresponsive" editor detection seems totally broken here.

    I mean, I get it pop up and delay me for 2-5 sec just because I clicked away from the shader editor window to the scene view. That doesn't sound right at all.

    It occurs when I'm also doing nothing at all! Got no choice due to work deadline need to roll back, but please make the feature optional at least.

    I'm not sure why it is automatic either, surely a developer is best off subscribing to this system on a need-basis. Having it always running seems like a point of failure.
     
    Ony, sniffle63 and Pacosmico like this.
  18. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Yes. You think this progress dialog should be removed and go back to how it was before? (i.e. no progress indicator when the editor is stuck) Or the timeout be tweaked? Or made configurable via preferences?

    Yup. And, is it non-responsive more often now, compared to how it was before.

    In my daily usage, I do get this dialog when entering play mode, or compiling scripts, or selecting many complex assets for the first time, but I don't get it "all the time doing trivial operations". So, would be great to know what is different in your case -- is it some editor/package code that adds itself as a listener to "many" editor operations and does something expensive? etc.
     
  19. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Hmm. I highly doubt this feature is the thing that's causing the delay (we haven't seen that behavior in any internal testing, and logically I can't think of a reason why it would be causing any slowdown at all). Can you send a repro?
     
    phobos2077 and hippocoder like this.
  20. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    with default empty scene, it appears for about 1.2s, which is still so fast that you cannot read anything (so its not useful in that short time).. i'd prefer if its possible to disable it. (can be useful for debugging hangs, but in daily use would get annoying)
     
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    My tool will *also* trigger it, but only sometimes.... as if editor is GC collecting behind scenes. It rebuilds a mesh and material) as I move a slider. Without this feature, it just slows the editor down to 30 fps worst case scenario without this feature.

    So I don't think editor is detecting its unresponsive time correctly, and even if it did I don't want it to pop up .... my own tools are in-house and any progress bars I would like to add myself. I don't need to wait 5 sec on Application Task when previously it was humming along fine at 30fps.

    Can you have this optional by any chance? :p


    (Feels like it happens whenever Unity does GC stuff). I could leave editor alone then come back and turn cam in scene view and boom there it is...
     
  22. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,754
    If the rate it appears in my use-case is "normal", then I think it should either be a togglable in the options or the threshold be bumped to say... 3-4 seconds? (I feel like 3-4 seconds is the point where I'll start wondering if Unity hang or not, and then the dialogue popping up would be useful).

    BUT, I'm not sure whether what I'm seeing is normal or not.

    Does 2020.x actually freeze a lot more than what I'm used to from previous versions, or is the dialogue just making it much more apparent?

    I think it's the former, but I'm not sure yet. But if that's the case, then the freezes themselves should be the thing to fix.

    I don't use a lot of packages, the only extras I add are Quick Search, Collaborate and FBX Exporter. I guess the first two could be suspect.
     
  23. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    I don't want a popup, just a status icon / text inside the editor.

    For example something like the cache server status icon on the bottom right corner, no popups.

    Also unity sometimes steals focus when in other apps in mac os, could be related to this popup too?
     
  24. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Pretty sure at this point it's tied into GC (my tool makes a ton of garbage as it's editor side only, regens meshes, materials etc)... and it reliably kicks in after 20-25 rebuilds with the slider (scientific I know) - but that's just cos it's made enough garbage for the editor to react and that's when I'm hit with the worst.

    So I think it's GC related. I'm gonna poke deeper.
     
  25. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Right, so that is the weird part -- this new "automatic progress dialog" should not slow anything down, period. If it does pop up in an operation that "previously" (whatever "previously" means) used to be super fast, it's one of the two things:

    1) there's a bug in the progress dialog code, in which case a repro would be most appreciated, or
    2) the operation that was fast "previously" is no longer fast "now", for whatever reason; the progress dialog is not relevant per se, it just shows that "in your face" now.

    yes absolutely, if it "freezes" now more than it used to, that's wrong and we should fix that. But details would help in which cases exactly it does freeze.
     
    Emperatrixxx, phobos2077 and Peter77 like this.
  26. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    I'd love that too, but that's "not quite possible" to do today. Because if the UI thread is "frozen", then by definition it can't repaint the progress indicator on the same thread. So it has to be a separate window with it's own message loop on another thread...

    That's unrelated bug, known, being fixed.
     
  27. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm fairly sure my tool is just spewing garbage and this popup actually takes focus away from the slider the user is using, so it was completely unnoticeable before, but now really get underfoot and interrupts user control. Happens with Unity's own stuff (URP/Shadergraph) too.

    Mouse drag is interrupted by it too, this thing keep stealing mouse focus which is the biggest possible annoyance. Consider you drag with mouse anything, and there is 1 sec delay? Under usual operation there is just a hitch and most of the time you don't notice. Your hardware cursor continues, you still have control on the GUI element and so on.

    But with this you lose control, the box pops up, the action from the user is cancelled, it's basically incredibly bad for any project that isn't hyper optimised.

    If it's something that can be in preferences and toggled off it will still impact many users, asset store will become a total S*** show in it's present state :D
     
  28. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    +deep profiling (or regular profiling) is now popup city too...
     
    Pacosmico and Peter77 like this.
  29. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    @hippocoder: can you please file bugs for all these cases. Nothing what you mention I've seen (but maybe I'm on a later alpha, e.g. I've fixed some of the mouse-drag related issues IIRC).
     
    hippocoder likes this.
  30. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yo! Sorry just so busy (sunday and deadline also) but I managed to reduce most of the problem down to a simple call to:

    Vector2[] uv = mesh.uv;

    That innocent childlike code, full of wonder, really triggered your system, especially if called often. I guess it is Unity clearing up GC Allocs that set it off big time...

    So basically anything editor related like shadergraph or anything that makes Unity do GC work seems to be the trigger here.

    Will try to provide better repro stuff once I'm out of the trenches my end. Thanks for indirectly optimising my editor code though - got me reducing my allocs a lot ;)

    Still got major pausing but fairly sure now any form of GC is the enemy for this new feature.
     
  31. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Am I the only one who really digs this change? I love seeing the timer there so I easily get better understanding on how long different tasks take (instead of just estimating them on my head or go through trouble of timing them myself).

    It just makes the cost of operations way more transparent IMO and also indicates that editor is busy (in past I used to click around to see when it's responsive again).

    I do agree the thing would be way less intrusive though if it was handled in the main editor UI. But for some dialogs it really makes a lot more sense where it is now.. like when building things and doing other tasks when you'd get the popup anyway.
     
  32. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    I say the editor is busy too often. This dumb progress indicator does not help, but vice versa. Especially in HDRP. Created new material - wait for the shader to compile, move the camera - wait for the shader to compile, press some button - wait for something again. Do not even compare, say with unity 2017, where everything was done for some reason IMMEDIATELY! What a crap!
     
    Last edited: Feb 24, 2020
  33. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Can you try on the alpha build before the progress dialog was introduced (i.e. alpha 22)? My suspicion (like mentioned above) is that the progress dialog only makes it more visible, but for some reason these operations were already slow. And yes, if they are slower now compared to some earlier version of Unity, then we should absolutely fix them. Please, please file bugs for all of these cases.
     
    phobos2077, rz_0lento and ROBYER1 like this.
  34. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    I prefer just showing progress bar at the right bottom of Editor just like how bake lighting does.

    upload_2020-2-24_15-55-26.png
     
  35. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Answer from Aras:
     
  36. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Just wanted to comment that while that UI bar is technically frozen today while processing things, it doesn't mean Unity couldn't make it "special" in a way that it runs on separate thread like the progress bar change if they really wanted to :)

    It just has way bigger impact on everything existing so it feels that putting the popup was just the "easy way" out.
     
  37. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Of course. That is extremely hard though. Like, would it be worth for someone to spend half a year on this (I'm not even kidding)? Probably not.
     
    gillemp likes this.
  38. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I guess not for the bar alone but that is just one thing among others that get blocked right now. For example Package Manager processing blocking the whole interface is an issue, especially since you could at the same time queue other package updates/installs etc while it processes stuff.

    Not trying to sound harsh but having UI blocking the whole editor does sound like there's quite a lot of technical debt behind all this and it just keeps going worse the bigger and fancier the engine gets. I do hope Unity keeps spending time to make it better because now it's us users who wait between many operations that shouldn't require waiting from our side.

    Also I do know (and appreciate) that there's already been work done in making some things less blocking. Like the new asset import pipeline. So, hoping to see even more things going async in the future. :)
     
    Ruslank100 and sand_lantern like this.
  39. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Yes, making as few things blocking as possible is the goal. But not trivial to get there :)
     
  40. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Well I don't mind the extra timing info being shown, it at least just confirms show much time is wasted on waiting...would even prefeer more detailed info on where the hold up is, would make it easier to track down what part of the project or asset is chewing up my time.
     
    socialtrens and Peter77 like this.
  41. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,739
    I am a mixed feelings on this one, part of me likes the recognition of the fact its busy and should tell us it isnt dead but that its struggling and so on, but at the same time, i kinda would have liked it to be a status bar thing too.. we shouldnt be getting hung UI issues, I thought the 1990s were over and the days of locked UIs were over and threading had been embraced. So it feels a bit like fixing the symptom not the problem, where we need fixing of whatevers taking too long or breaking the UI thread, not having a nanny system that pops up to say.. but its better than nothing which we had before.
     
    Ruslank100 likes this.
  42. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    On Mac there is already the spinning beachball to indicate things are stalling, and its less intrusive.
     
    MegamaDev and hippocoder like this.
  43. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,739
    People used to use the hourglass thing in windows, but they seem to be going off that
     
  44. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I just want it so it defaults to off, because no matter how refined this feature becomes it can't solve the 1.1s flash issue. This will always pop up and eventually grind everyone's gears.

    This feature is fantastic perhaps, for Unity developers or asset developers but is actually intrusive for everyday dev.

    The editor is filled with micro-pausing from any number of assets from asset store, Unity's own stuff and across a wide range of applications. On a laptop its easy for the os to stutter sometimes and this just throws up tonnes of little hold ons which never were there before and often never noticed cos the user was panning the scene or just pondering settings, but now it's a flashy rave disco dance of popups.

    It's just not something I can see defaulting to on.
     
    entropicjoey1, Pacosmico and optimise like this.
  45. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    @hippocoder What I'm planning now is: 1) increase the default delay until progress shows up from 1.0s to 3.0s, and 2) make it configurable in preferences.

    Why so far I want to keep on on? Because frankly, the amount of positive feedback I've heard is higher than the amount of people who are annoyed by it. That said, this is very early days of 2020.1 testing, if it turns out people really don't like it, then sure we'll turn it off by default.

    That said, I'd still love a repro of your "dragging a slider in inspector that causes GC allocations pops up the dialog" issue. Tried making one myself today, and could not (made some scripts that read mesh data a whole bunch of times on each slider drag -- everything worked smoothly, no dialogs popping up). So there must be something else in your case that is different.
     
  46. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    • 2 make it configurable in preferences.
    This fixes all my concerns, thanks!
     
    Immu and phobos2077 like this.
  47. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I do think this dialog should pop up by default. If it's configurable and people can turn it off manually, that's win-win IMO then.

    I spend a lot of time on official unity discord and there's reoccurring theme on especially new users wanting to kill the Unity process when they think it's stuck, on project opening etc. Having a message on screen telling them to wait is probably going to at least help on some of these cases.
     
    phobos2077 and Lars-Steenhoff like this.
  48. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    1second is fine.. or configurable
     
  49. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hopefully asset store authors will have time to remove their own progress boxes or people will be hit by 2 at the same time, unless this feature auto-detects, but that sounds like just confusion waiting to happen.

    I'm not making a fuss because I dislike it (I actually do like it) but because I think it's got potential to disrupt way more than it will help if on by default.
     
  50. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    That's not happening; the "hey unity is busy" only ever shows up if there's no "regular" progress bar, yet the editor is not responsive.

    I got a good bug report with this new progress bar interacting badly with loading & navigating large Profiler captures; fixing that as we speak. Thanks whoever filed it!