Search Issue Tracker

Fixed in 2019.3.X



Found in



Issue ID




[Regression ADB V1-V2] Focusing the Editor Window causes noticeable Slowdowns

Asset - Database


How to reproduce:
1. Open the project from Case 1108597
2. Open the Profiler window and profile the Editor
3. Focus another window(Notepad, Internet browser, another project, etc)
4. Re-focus the project window
5. Observe the Spike in the Profiler window caused by the AssetDatabase.Refresh

Expected result: Re-focusing the Editor does not cause a major slowdown
Actual result: Re-focusing the Editor does cause a noticeable slowdown

Reproducible with: 2019.3.0a1, 2019.3.0a11
Not reproducible with: 2017.4.31f1, 2018.4.5f1, 2019.1.13f1, 2019.2.0f1

  1. Resolution Note (fix version 2019.3):

    There are some potential fixes that are feasible but not really worth it for the speed up we could get:
    1. Jobify the Enumeration code -> This can halve the time it takes to enumerate using 4 jobs, so instead of 77ms, we would get 38ms refresh time
    2. Jobify the Categorize Assets code -> This could result in a decent speed up, so instead of 70ms we could bring it down to perhaps 10ms
    3. ImportAndPostProcessAssets currently there's no scheduled improvement for it, but we might be able to skip it completely if we detect there's no changes to scrips, settings & postprocessed assets.

    However, we have some work scheduled that could algoritmically change how this is done:
    1. Scan using Directory Monitor -> We would get the time down to 1ms
    2. Reverse dependency graph -> We would reduce the search space to not have to do an O(n) operation for assets, thus it nullifies the need to jobify the asset categorization code

    The jobification changes are not trivial, so that would block a programmer for a week or two, and that would prevent other high priority bugs from being fixed, so for now we will have to live with this slowdown while we implement the correct fixes for 2020.1

    Fixed in 2020.1.0a19

  2. Resolution Note (fix version 2019.3):

    Fixed in 2019.3.0f5

Comments (21)

  1. RoyM_Daemon

    Jul 30, 2020 02:10

    Yeah this is definitely not fixed, we updated to 2019.4 the other day and it is gruelingly slow. 32 seconds when adding a new line to a script.

  2. unity_grjwlc9gkj

    Jul 10, 2020 06:21

    exists in 2019.3.15f.
    profiler spikes in AssetDatabase.V2.Refresh.

  3. Kenthria11

    Jun 11, 2020 18:56

    Still exists in 2020.2.0a13 - how do we reopen this issue?

  4. RakNet

    Jun 04, 2020 16:18

    This is not fixed

  5. ldc3

    Jun 04, 2020 14:27

    1 hour, 23 minutes +

  6. ldc3

    Jun 04, 2020 13:27

    Small project just started, 300 lines of code. Changed one file (50 lines of code) making change to one line. Unity has been running AssetDatabase.refresh for 25 minutes and still counting now. This is NOT FIXED.

  7. ldc3

    Jun 04, 2020 13:16

    Also seeing this in 2020.1.0b10

  8. Symo7

    Apr 20, 2020 14:19

    This is still an issue in 2020.1.0b2.3333. When saving a file in Visual Studio and switching back to the editor it can take upwards of 10 seconds to do an 'AssetDatabase.Refresh' where this used to be fairly instant in 2018.

  9. Tokeka

    Mar 06, 2020 15:37

    2019.3.3 still has this issue, it may be faster than it was, but it is not fixed.
    (just upgraded a project from 2019.2 to .3 and saw this happening)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.