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

Feedback (Case 1171344) Focusing editor causes "Waiting Mousecursor" for 2 secs before it gets repsonsive

Discussion in '2019.3 Beta' started by Peter77, Jul 23, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Focusing the Editor causes a two seconds freeze with the project attached to Case 1108597 on my PC. Looking at the Profiler reveals it's caused by AssetDatabase.V2.Scan. It probably gets worse the more assets the project contains.

    AssetDatabase_V2_Scan.png

    Reproduce
    1. Use hardware similar to the PC I submitted the bug-report with. You probably can't reproduce it on high-end hardware.
    2. Open project from Case 1108597
    3. Open Notepad
    4. Focus Unity Editor
    Repeat step 3 and 4 as often as you want.

    Actual
    Focusing Unity Editor displays for about two seconds a "Waiting Mousecursor" before the editor gets responsive.

    Expected
    Editor should be responsive immediately.
     
  2. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    YES this type of issue happens so often on a huge project I'm on, Unity editor wont come up after being de-focused for a bit (not out of ram or anything), often much longer than 2 seconds, really appreciate you reporting these types of issues.
     
    Peter77 likes this.
  3. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Are you using HDRP / LWRP in that project?

    We're seeing really weird glitches on focussing / defocussing Unity with everything from lights, ambient occlusion, culling, screen space reflections going crazy in specific camera positions. Focussing Unity again freezes everything for a couple seconds and then (sometimes only after shifting scene view a bit) everything goes back to "normal".
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Nope. It uses Unity built-in renderer.
     
  5. laessnb

    laessnb

    Joined:
    Jun 10, 2014
    Posts:
    101
    This is happening to us as well. Not only that, but after the spinner, Unity also doesn't always actually have focus. For example, hitting Control-P does nothing after tabbing back in (maybe only if it had to recompile). So these two very basic things are major usability regressions from previous versions because they stack up for a lot of lost time and frustration.
     
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    laessnb and Peter77 like this.
  7. laessnb

    laessnb

    Joined:
    Jun 10, 2014
    Posts:
    101
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I tested this 2019.3.0f1. "AssetDatabase.Refresh" went down from 1.55s to 0.35s in the Profiler, that's a great improvement. Great job!

    The windows waiting mousecursor is still shown for I guess 0.7s though. If you want that switching to Unity feels great and instant, you might want to take a look at how to minimize the time the waiting mousecursor is shown.
     
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    A fix for this issue went into f5.
     
    isaac-ashdown likes this.
  10. isaac-ashdown

    isaac-ashdown

    Joined:
    Jan 30, 2019
    Posts:
    69
    Great! Any ETA on when that should land?
     
  11. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Fantastic!
     
  12. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    The build should get promoted to QA today and could go out as early as Monday.
     
    Zepa and isaac-ashdown like this.
  13. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I tested it with 2019.3.0f5, focusing the editor costs about 280ms according to the profiler. I profiled 2017.4.34f1 with Case 1108597 as well and it's "only" faster by 90ms. However, these 90ms somehow make it feel significantly more responsive.

    2017.4 doesn't have the AssetDatabase profiler marker, but if you just look at the entire "CPU" time for that "focus frame", it seems to be about 90ms faster.
    upload_2020-1-13_20-17-0.png

    upload_2020-1-13_20-17-29.png
     
    valentingurkov and SugoiDev like this.
  14. TautvydasKu

    TautvydasKu

    Unity Technologies

    Joined:
    Jul 23, 2019
    Posts:
    1
    We have a report with the same issue, however, we are unable to reproduce the issue on our side. Maybe you know a consistent way to reproduce the issue? The information we have is that the issue reproduces when focusing on Unity after editing an XML in Visual Studio. Is this the case on your side as well?
     
  15. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    upload_2021-11-25_17-32-11.png
    Sadly seems to be back for 2021.1.22