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

    Aug 03, 2021 03:15

    not fixed for unity 2020.3.11lts.

    but this bug was closed. so unity will never not fix it?

  2. gabrielareia

    May 30, 2021 01:05

    Not fixed!! Same result using 2020.3.3f1 and 2021.1.9f1

  3. FlorianBernard

    Mar 02, 2021 16:01

    Opening my project takes:
    - with Cache Server is ON, 5-6 minutes stuck on AssetDatabase Refresh
    - with Cache Server is OFF, 30 secs

    Unity 2020.2.4f1

  4. joaoborlido17465

    Mar 02, 2021 10:05

    This is definitely not fixed! Working on 2020.2.5f1 and Asset.RefreshDatabase is taking a massive amount of time to finish. When is Unity going to stop ignoring this issue and start listening to its users' complaints?

  5. DevinW

    Nov 29, 2020 00:38

    This is not fixed.

  6. joanpescador

    Nov 19, 2020 08:24

    2 minute 40 seconds to update one line of code in a project just opened 3 minutes ago in v2020.1.6.
    Intel I7, 16gb RAM.
    This is not fixed.

  7. Ava42

    Nov 11, 2020 13:38

    1 line of code changed - 7 minutes stuck.

  8. asaf92

    Oct 23, 2020 12:44

    Still an issue in 2020.1.6f1

  9. dfl_unity

    Sep 25, 2020 19:16

    For the past 6 months or so, every switch to the editor costs me 20-30 seconds of "asset database refresh" or "reimport", often when I do nothing but *edit* a cs file. Huge impediment to my productivity.

  10. darthdeus

    Aug 16, 2020 19:20

    This issue is still not fixed in 2020.1.2f1

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.