Search Issue Tracker

Fixed in 2021.1.X

Fixed in 2019.4.X, 2020.1.X

Votes

87

Found in

2019.4

2020.1.2f1

2020.2

Issue ID

1270910

Regression

No

[Performance]Console Pro in non-collapse mode and with large logs causes Slow asset refresh when modifying any script, 45 second

Serialization

-

Reproduction steps:
1. Open user's attached project
2. In Profiler window, set profiling to Editor mode
3. Open /Assets/Scripts/AI/OfficeWorkerAI.cs using notepad
4. In "Awake()" function, add a space to the Debug.LogWarning string and save script
5. In Profiler window, observe performance

Expected result: Asset reimport is fast
Actual result: Asset reimport is considerably slow

Reproducible with: 2019.4.9f1, 2020.1.4f1, 2020.2.0b1
Could not test with: 2018.4.27f1 (console errors break project)

Note: Issue reproduces using Asset Import Pipeline V1 and V2
Note 2: The repro project here has been found to have very slow reload time due to Console Pro. If you have a lot of assert,warning the domain reload is greatly impacted negatively due to the usage of Console Pro. To improve you can enable "Collapse" mode which helps or close the Console Pro window. In this case, going from non-collapse Console Pro mode ~25 seconds to ~2.5 seconds in collapse mode and less without Console Pro.
Note 3: Investigating a duplicate issue it was observed that having the Package Manager window open will result in degradation of domain reload time over the course of a session. This is being fixed and tracked here: https://issuetracker.unity3d.com/issues/compilation-and-refresh-time-increases-after-each-script-change
Note 4: If you use Burst, upgrading to Burst 1.4.0-preview.5 should allow to save some time. In the case of this project it will save 0.2 seconds on every domain reload.
Note 5: If your domain reload times are not caused by one of the above issue, please report a separate issue with your project so that we can investigate. Thank you!

  1. Resolution Note (fix version 2021.1):

    This specific issue was with Console Pro in non-collapse mode. This information was sent to Console Pro developer. We also started a thread dedicated to domain reloads:
    https://forum.unity.com/threads/long-waiting-times-in-the-editor-slow-asset-refresh-when-modifying-any-script.981384/

Comments (20)

  1. LunarMountainGames

    Nov 19, 2020 04:16

    Any progress with this bug? Incredibly frustrating.

  2. metinevren

    Oct 19, 2020 16:23

    @LeonhardP
    I'm not using either of those. I still have this issue.

  3. LeonhardP

    Sep 25, 2020 09:46

    The degraded domain reload times in the project associated with this bug report are caused by Console Pro. Please read the updates in the description for more information.

    We're currently re-evaluating all submitted bug reports that were previously classified as duplicates of this case. We will update its description with references to other similar issues we discover.

    Besides Console Pro, Odin Inspector is another asset that can trigger a degradation of domain reload times and slow domain load times. We've contacted the developers and reported an issue that we discovered. Besides the one we told them about yesterday, which can cause degradation, they're aware of other ones as well, mostly causing slow domain load times. Those are already fixed in their current 3.0 beta.

    If you're using Odin Inspector and are experiencing slow or degraded domain reload times, it might be worth a try to check out version 3.0 if possible.

    One of the primary triggers for degraded domain reload times are ScriptableObjects which are created on load, typically in the static constructor of a class with the [InitializeOnLoad] attribute or a method with [InitializeOnLoad] attribute. What is happening: ScriptableObject instances get restored and [InitializeOnLoad] gets called again causing an extra instance to be created and initialized.

    In 2020.1 and up one way to address this is to make the ScriptableObject a ScriptableSingleton. If you do not need this object to be a ScriptableObject another alternative is to use a plain old C# object.

    Be mindful of the initialization of those objects created on load as it will impact your domain reload times.

  4. calpolican

    Sep 24, 2020 20:06

    This is really bad. Around 30 seconds every time you add a character to a script. Please address this fast.

  5. Paulie68000

    Sep 23, 2020 11:33

    This is a proper deal breaker for me - we've got a mature evolving product in flight and we've shifted over to 2019 LTS to get the DOTS advantages. After the heavy lift of getting everything rendering again this issue has destroyed our productivity to the point of questioning whether we jump ship to licensing another engine, even with the huge upheaval that would require.

    I implore you to urgently address this issue before developers jump ship in droves. Iteration time is a huge win for Unity - this has just killed that advantage stone dead.

  6. Shinyclef

    Sep 23, 2020 05:20

    This issue has broken my spirit. My will to develop is being crushed with every change I make. Unity takes several minutes to open, and script updates take over 20s each. Don't know if it's related, but attaching the debugger in VS takes another 20sec as well. I... just... can't anymore.. SOS.

    Easily the slowest unity experience I've had since I started with Unity 4.x, by faaaarr. Kill me now... suffocating in editor wait time...

  7. Wrymnn

    Sep 22, 2020 20:24

    The performance is abysmal, the refresh rate takes 30s+ for any code change.

  8. SamOld

    Sep 20, 2020 22:01

    There's mention here in the comments of ADB V2. That definitely seemed to make it slower for me, but it was still unacceptably slow with V1 at 15 seconds plus in a tiny/empty project. I think that there may be a number of compounding issues here.

    I actually quit / paused working on my Unity project because this made it so infuriating. I have ADD and the agonising wait from every change completely destroyed my workflow. I hope this can be resolved soon!

    There was talk of a 500ms iteration target, so the current situation is a joke, and a big regression from where things were a few years ago.

  9. jdtec

    Sep 20, 2020 08:14

    This came in with 2019.3 asset pipeline v2. 2019.2 with asset pipeline v1 did not have this slowdown. Please restore script change and enter playmode times to how good they were before.

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.