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 (17)

  1. E658c77d5c153022385f0bf4e5261fc3?d=mm

    DevinW

    Nov 29, 2020 00:38

    This is not fixed.

  2. 82715bb12b9101c33b212e57e3f4b777?d=mm

    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.

  3. 4e82d56ea93c1f5a7b12fe72af130381?d=mm

    Ava42

    Nov 11, 2020 13:38

    1 line of code changed - 7 minutes stuck.
    2020.1.8f1

  4. 6e656bd4231d56cb4a15e6a6250b7068?d=mm

    asaf92

    Oct 23, 2020 12:44

    Still an issue in 2020.1.6f1

  5. 720312520c46d9296676b5a59584cca9?d=mm

    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.

  6. 16a5eec5eca4550033c0e19dba3b32b8?d=mm

    darthdeus

    Aug 16, 2020 19:20

    This issue is still not fixed in 2020.1.2f1

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

  8. Fe8d10aa8626354a4363d004b284a2f9?d=mm

    unity_grjwlc9gkj

    Jul 10, 2020 06:21

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

  9. 02344944cdc9b924399a9961aea0ff1b?d=mm

    Kenthria11

    Jun 11, 2020 18:56

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

  10. C0e1f91ace933c60bc8ea6b22c27f81b?d=mm

    RakNet

    Jun 04, 2020 16:18

    This is not fixed

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.