Search Issue Tracker

Fixed in 2019.3

Votes

6

Found in

2019.3.0a1

2019.3.0a10

Issue ID

1171344

Regression

Yes

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

Asset Import Pipeline

-

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. Response avatar

    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. Response avatar

    Resolution Note (fix version 2019.3):

    Fixed in 2019.3.0f5

Comments (12)

  1. 16a5eec5eca4550033c0e19dba3b32b8?d=mm

    darthdeus

    Aug 16, 2020 19:20

    This issue is still not fixed in 2020.1.2f1

  2. C39e47fbd564f1f1d8056fe89e5b8fe6?d=mm

    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.

  3. Fe8d10aa8626354a4363d004b284a2f9?d=mm

    unity_grjwlc9gkj

    Jul 10, 2020 06:21

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

  4. 02344944cdc9b924399a9961aea0ff1b?d=mm

    Kenthria11

    Jun 11, 2020 18:56

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

  5. C0e1f91ace933c60bc8ea6b22c27f81b?d=mm

    RakNet

    Jun 04, 2020 16:18

    This is not fixed

  6. D3207dffcde2e34a63c0bb36fbfcbf8f?d=mm

    ldc3

    Jun 04, 2020 14:27

    1 hour, 23 minutes +

  7. D3207dffcde2e34a63c0bb36fbfcbf8f?d=mm

    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.

  8. D3207dffcde2e34a63c0bb36fbfcbf8f?d=mm

    ldc3

    Jun 04, 2020 13:16

    Also seeing this in 2020.1.0b10

  9. A261d19937e1e2b682da0998a84e4c6f?d=mm

    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.

  10. 4199fd963623f88b2f6ace32c46a8a72?d=mm

    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.