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. Ramobo

    Ramobo

    Joined:
    Dec 26, 2018
    Posts:
    212
    2020.1.0a24, the "it only appears after 1 second" part is working.

    Empty project, 3D template:
    • 3 seconds to enter play mode with domain reload, instant exit;
    • Instant enter play mode without domain reload, instant exit;
    • Instant open default scene;
    • 3 seconds to compile;
    Pretty standard for Unity.

    Project with 1000 assets, about 600 of which are scripts, about 500 of which are from NoesisGUI in a Plugins folder, and about 90 of which are from another asset:
    43 seconds to compile when reimporting an assembly definition. To be fair, this isn't a common operation;
    • 11 seconds to compile when reimporting a script.

    Empty scene:
    • 5.5 seconds to enter play mode with domain reload, effectively instant exit;
    • Effectively instant enter play mode with domain reload, same time to exit;
    • Instant open.

    Scene with about 10 objects and an entity subscene with 1:
    • 7 seconds to enter play mode with domain reload, <0.5 seconds to exit;
    • Instant enter play mode without domain reload, same time to exit;
    EDIT: Whoops, inverted the times above.
    • Instant open.
    [whydoestheforumnothavestrikethroughsdammit]By the way, if you're having insane enter play mode times without domain reload, plus a duplicated game window, it might be UIElements Runtime, I ran into it while writing this post. This warning is mostly why I didn't throw this post away.[/whydoestheforumnothavestrikethroughsdammit] Never mind, it was all caused by NoesisGUI.

    <sarcasm>Most suboptimal, but still rather standard. It's Unity we're talking about, I don't understand those slowdowns you guys are talking about.</sarcasm>
     
    Last edited: Feb 25, 2020
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    @Ramobo the times are the same "now" vs in "earlier unity versions" though? (I hope) The question is, does presence of that progress bar makes them "feel" slower or not. Some people like the fact that "hey I can see the durations of various operations!", others are "now that I can see the times, it feels slower".

    Personally I already had a few times where seeing the numbers made me go "oh, was it 10 seconds all this time? heck, I'll go optimize that part", so that's a (small) win :)
     
  3. Ramobo

    Ramobo

    Joined:
    Dec 26, 2018
    Posts:
    212
    They might make everything feel slower since now it's easier to benchmark this type of stuff, but I can't see how they would slow anything down: they're supposed to be updating themselves with progress that simply gets posted by the operation on the main thread.

    I don't really feel like hunting down and installing the version before the progress bars and doing all the benchmarks again. That whole post was motivated by insane slowdowns that ended up being caused by NoesisGUI.
     
    Last edited: Feb 25, 2020
  4. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Maybe use a different mechanism instead of a full blown focus stealing pop-up? You can set up windows in ways that are less intrusive, like having no default OS chrome and auto positioning to the bottom right corner so it looks less conspicuous.
     
  5. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    Yes exactly this. When I originally started using Unity a few years back I was surprised at the general editor UI lock-ups, although they weren't that bad back then.

    It's bad UX for UI to freeze. Feels like it could be so much better...

    I appreciate that you just happen to be the person working on this specific feature and replying to this thread and for what it's worth I think it's good that you are communicating here directly about this specific issue.

    I just wanted to say +1 for encouraging Unity editor team to remove whatever super impossible, mountain to climb, tech debt is in the editor so that it isn't such a blocking & freezing user experience.

    Maybe take a more long term approach so you can build on more stable foundations.
     
  6. DanielRiches

    DanielRiches

    Joined:
    Nov 23, 2019
    Posts:
    166
    Well, on the Splash Screen they could just update the Splash to something that pulses gently so if it freezes you'll see (would this be any easier to do on a seperate thread? using a visual representation rather than an actual prompt?)

    During the editor I agree, It shouldn't niggle me because it's a practical feature and should remain, perhaps moving the prompt to the same bar as the "Compiling Shader" progress bar would be possible? that way we can still see the timer running but it's not in your face unless you actively seek it out.
     
  7. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Well they do have a status bar, only it really doesn't get used as much as I would like it to, ie toolbar icons, menus, , progress bars etc customization on it.... hopefully more is done on the general editor gui/ux because it is seriously lacking actual improvements and I haven't noticed any (ie good changes, thefrontend 2019.3 changes are big setback, though the change to the ui backend might be an improvement) in the time I've been using unity, bar the third party assets that do actually try to improve things.
     
  8. MasoInar

    MasoInar

    Joined:
    Feb 20, 2014
    Posts:
    126
    That popup is really bad on latest beta. When trying to set Particle System properties (color gradients alpha values etc..) it constantly flashes for a sec when playing with those slider values. Those sliders are now completely unusable. What's going on?
     
    sama-van, bugfinders and mgear like this.
  9. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    My participation in that sweet thread which I already post in the 2020.1 beta thread anyway.

    Spent the last 3h on that beta, and this loading popup isn't getting worse since a21? a22?
    The waiting time is horrible and I hit the 30s each time I reload script and then again pressing play.
    It's really turning out to be a mad thing, and that "AssetDataBase.Refresh" means nothing. You should have wrote "Going KFC, forgotten my keys.".

    https://forum.unity.com/threads/unity-2020-1-0-beta-1-has-been-released.845161/#post-5580460
     
    bugfinders and id0 like this.
  10. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    But still we could access the editor.
    Now it just take over click and we cannot do anything.
    "ok let just freeze the editor while its reloading scripts, who care".
     
    id0 likes this.
  11. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Pretty sure editor was frozen all along for the processing, or you have a case where it wasn't?
     
    JoNax97 likes this.
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I hope Unity use the version of this internally which triggers at 0.5s.... :D
     
    MasoInar likes this.
  13. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I believe Visual Studio is using the same or similar approach as well.
     
  14. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    It's nice, now to have a metric when filing a bug.
    Give it to Aras to add transparency to Unity!
     
  15. tbg10101_

    tbg10101_

    Joined:
    Mar 13, 2011
    Posts:
    192
    You joke but this is actually a great idea and I think I might do that in internal projects (even if the progress bar isn't in release builds) just so I can bring slow points to my attention.
     
  16. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It already forced my hand to optimise my own editor tools. It's intolerable nagging would only be made better with a small icon of a happy guy in a rainbow wig. It's a pretty good feature (especially if we can set the parameters).
     
  17. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,288
    It would be better if the popup text would have at least some kind of meaning, unlike this:

    repaint.png

    Here the package manager is searching the unity database for a search term. However the popup shows it's repainting the scene ...
     
  18. melt200x

    melt200x

    Joined:
    Oct 25, 2017
    Posts:
    1
    after simple code change ever, long long time ( Refresh.AssetDatabase, and then Application.Reload ) for wft 20 lines of code, unusable unity version .... and with the xbox live plugin more problems als windows self have bugs *G
     
    amarillosebas and brando_slc like this.
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Got a quick bug report? if you have one just drop the case number here, see if it can be fixed for you. People often register surprise when something comes out of beta but their bug still exists, because they assumed it was common :(
     
    JoNax97, Peter77 and LeonhardP like this.
  20. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,288
    Since I already have that from another bug report, I repost it to visualize the major annoyance. I don't see it as a win, rather a big loss because all the time I wonder what it's actually doing and why can't this perform better, especially why does it take so long to repaint the scene when it actually should load the packages and i'm not in any scene:

    bug.gif
    Besides I can't do anything anyway while that runs and why does it not have a cancel button in case of e. g. a slow connection?
     
  21. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    It can't have a cancel button because it's telling you that a thread-blocking operation is ongoing. You can't interact with the program whatsoever; the message box it just to inform you why. I agree that it's not the most elegant or convenient solution, but let's not attack the feature, instead let's focus on the problem it brings to the spotlight.

    Getting mad at this is like being Ill and not attacking the virus or even the fever, but instead yelling at the thermometer because it's showing a bad number.
     
    sand_lantern likes this.
  22. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,288
    If it's blocking and I can't cancel it, the time information and what it's doing is useless. The only information that's required is whether Unity is still alive or if I should kill it in the task manager.

    It's custom to allow cancelling long running operations simply because there is no guarantee it will ever end. Best example is the search above. If it takes a minute and I want it to stop because I'm tired of waiting because of e. g. a slow connection, then I should be able to. If it's an operation that must complete, then I shouldn't be able to cancel.
     
  23. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,335
    I'm guessing that "repaint all scenes" is just above "find packages" in the call stack, so the bug is that the Hold On popup is looking at the wrong call. @Aras, that's probably a real bug to look into, though I imagine diagnosing "what is Unity waiting for" is hard. What are you using to populate the name for the process we're waiting for?



    You're correct, but this is a bug in the Package Manager. You should post the complaints about that process being slow and not cancellable here.
     
  24. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    That was always the case. While the script domain reload is happening, the editor is "stuck" and non-interactable. If the progress bar says it spends 30 seconds doing that, then it would still be 30 seconds without the progress bar. So maybe in 2020.1 the actual domain reload got worse? Maybe now you have more packages or more scripts? Maybe the scripts themselves are doing something complex during domain reload? I don't know. A bug report with the project along the lines "why this hangs for 30 seconds ffs" would help. Domain reloads can take anywhere from 1second to 1minute, completely depending on the amount of scripts and the amount of work they are possibly doing for domain reload.
     
  25. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    We plan on adding actual markers of "hey if the editor is stuck here display this label" to various places that are missing. Like this one. File bugs for each of them, along the lines of "I was doing XYZ, the editor got stuck for N seconds, the progress dialog displayed text Foobar but it would better if it said Barfoo".
     
    richardkettlewell likes this.
  26. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Yeah today the "display what unity is doing" is driven by some "editor performance markers" that are sprinkled around in various places of the code (*). Presumably this particular "possibly long blocking operation" (whatever the package manager window is doing) does not have one, and does not indicate the progress in any way. So it just displays whatever performance marker was the closest.

    (*) We played around with various other means, like using profiler markers, or looking at the main thread callstack, but all of these are either "not thread safe" or "it still does not result in much more useful info" or "well that would make things slower in general even when we don't need it".
     
    Baste and JoNax97 like this.
  27. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,428
    in the older versions,
    when scripts were compiling it was possible to work with editor,
    with progress bar, you cannot..? or is it from something else.
     
  28. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,335
    You could never work while the scripts were compiling during the assembly reload stage of compilation (when the compilation spinner was hanging). Are you seeing the hold on window pop up immediately after you tab over from the code editor?

    Is the "Editor Performance Markers" just calls to Profiler.BeginSample?

    In that case, we could leverage it for our own tools to just put those in and have the dialogue pop up. We do use EditorUtility.DisplayProgressBar quite a bit, but sometimes the fill amount there is meaningless, so we could just as well piggyback on this feature.
     
  29. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,288
    Wouldn't a sticky note be better where everyone posts their findings? Otherwise you'd get flooded with bug reports.
     
  30. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,428
    2017.x
    - modify script in vs, alt tab back to unity
    - recompiling icon spinning at bottom
    - editor is responsive, can rotate camera or select things (well maybe small hang at the end, i guess that's the reload part)

    2020.x
    - modify script in vs, alt tab back to unity
    - recompiling icon spinning at bottom
    - editor is not responsive, mouse cursor spinning, progress bar blocks everything else
     
  31. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Right, so apparently the time between "recompiling spinning icon at the bottom" and "editor is responsive" is much larger now. This is where the C# "domain" gets reloaded to kick in the new code.

    Why it was faster in 2017 vs 2020? I don't know, but the progress bar has nothing to do with it. If it's much slower on same project (same amount of scripts, same set of packages, same scene open), then that's a performance bug in scripting area that we should fix.

    I think in general on a "default project created with 2017" vs "default project created with 2020", they are not the same projects in terms of script count etc., largely due to 2020 having much more default packages etc. (Timeline, Collab, ..., ...). But again, nothing that is caused by the progress bar.
     
    laurentlavigne and ROBYER1 like this.
  32. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,335
    Oh, right, that's a different thing. You can read about it here. It was introduced in Unity 2019, so it's definitely not got anything to do with this loading bar.

    Essentially Unity broke that workflow because it wasn't a feature, but an implementation side-effect. I don't know what the status of "fixing" it again is.

    @Aras, your team is doing a lot of wonderful work right now on Editor usability (thanks!). Is the issue in that thread something you can at least check in on? It's making me kinda dread working in any version over 2018 because it's so bad.
     
    MarcusJT, mgear and JoNax97 like this.
  33. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    I'd suggest keeping on writing on that thread, tagging @lukaszunity :)
     
  34. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    We can live with slow during alpha, then you can take it out on beta or RC.
     
  35. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,288
    I had this when I created a new project:

    done.png

    It was busy in "Done" ...

    I suggest someone at Unity first uses Unity and writes down everything before anyone of the beta users writes a bug. It's just a waste of everyone's time if the trivial and obvious things aren't fixed first :)
     
    amarillosebas likes this.
  36. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    I don't disagree with this, but this particular one (at end of importing the progress bar says "Done" for a while in some cases) has been there for years already. Yes someone should improve it, since saying "Done" for a while is not great, but this is definitely not new in 2020.1.
     
  37. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,288
    But its flaw has become obvious now :D
     
  38. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,781
    I agree, before some of the delays didnt entirely show, but now theres a big claxon of an event happening each time and rather than distracting us from it, its making us all stare at it
     
    valentingurkov likes this.
  39. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    FYI, 2020.1 beta 3 (should be out soon-ish) will have these updates to these new progress bars:

    - They will start to automatically show up after 3 seconds instead of 1 second,
    - The automatic show delay is configurable in preferences,
    - Fixed various cases where the progress dialog was stealing the input focus,
    - Progress dialog does not show up while dragging something with mouse, even if editor is "very very busy" for some of that time,
    - Changed time displayed in the progress dialog, no longer displays tenth's of a second (too distracting), and displays minutes (or hours!) if needed,
    - Improved display of what is shown as "unity is busy" reason for some of the cases where it was not clear before,
    - Ctrl+C while a focused progress dialog is shown copies the text to clipboard.
     
  40. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    Thanks, of course, but this terrible feature shouldn't have existed at all. Or appear somewhere below, as before. if it's not broke, don't fix it. I can already see that the editor has become slower. My gratitude to this wonderful progress bar that constantly reminds me about it[Sarcasm].
     
    Last edited: Mar 23, 2020
  41. MasoInar

    MasoInar

    Joined:
    Feb 20, 2014
    Posts:
    126
    Seems like very good changes. I don't mind if editor is unresponsive for sec or two when compiling or whatever, but that popping window was annoying. Now that I can set it to something like 10 secs is very nice.

    Overall 2020.1.b2 seems to be quite stable and I haven't experienced any crashes. Also editor feels bit faster than 2019.3. Something has also happened with Android il2cpp builds, as they are now super fast after first build compared to 2019.2
     
  42. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Cheers. I actually probably will be setting it to 0.5s at times and maybe 1-3s at other times. It can help narrow down perf issues you didn't know existed.

    Seems like it'll be perfect now. Thanks!
     
  43. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    In 2020.1.0b2 on Windows 10, if I hold the left-mouse button on any of the Minimize/Maximize/Close buttons in the window title-bar, the "Hold on" dialog appears.

    PS: Can you replace "Hold on" with "Please wait"?
     
  44. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Would be amusing if we could define that in prefs too...
     
    bgrz and bugfinders like this.
  45. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,428
    thanks for not limiting the max amount to some small value!

    upload_2020-3-26_15-10-39.png
     
  46. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    "computer sez wait!"
     
    Ruslank100 and hippocoder like this.
  47. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I am immature enough to write a script on startup that would change the Hold on text to a random one each time to keep things fresh... so please add the text field to prefs too!
     
    Pacosmico, Peter77 and bugfinders like this.
  48. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    you'd make lotsa money with this, but not on the asset store anymore because someone had an aneurysm at HQ :rolleyes:
     
  49. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,453
    No, they are a bit more intrusive than that and we'd like to fix that before we make them public.
     
  50. Deleted User

    Deleted User

    Guest

    Annotation 2020-05-03 224953.jpeg
    So I have this project im working on, everytime I enter playmode that "Hold On (busy for...)" pops up. After about a second or two playmode starts. But then when I use the Instantiate() method it pops up again, this time it doesn't go away. I need help, please someone?
     
    Last edited by a moderator: May 3, 2020