is domain reload slowdown fixed?

It went down 2x to 3X in the 2021.x branch, compilo got sped up but reloading was still much slower than 2020.1.17. We were told that work was being done which would bear fruit in 2022.

youve asked two questions so far that couldve been answered by you opening unity 2020.1b

I can’t be bothered installing every single version, like you cannot be bothered making useful contribution to this forum :wink:

5 Likes

Sounds like a you problem. The answer is maybe.

The answer appears to be “apparently not” and it gets worse over time. Same (relatively small) code base in 2021.2.0b4 compiled and reloaded in 2022.1.0b12 is 1.35x slower on a fresh start of the editor. After a few hours of recompiles/reloads working on code, this became nearly 2x slower. We’re not using any 3rd party code and have only a few [InitializeOnLoad] attributes.

3 Likes

We’re not using the 2022.x betas but I’m keeping an eye on the forums. I hope there’s light down the tunnel somewhere and something is improving because the Unity 2020 and 2021 editor experience is becoming more glacial every day. I’m stating the obvious, but the script compilation, play times and stop times in 2021.2.latest are frustratingly slow compared to earlier versions. (I realise I should be jumping into the 2022 beta and comparing some projects but we don’t have time for that at the moment, sorry!)

Everyone’s project and hardware is different so this is anecdotal, but currently in 2021.2.16 on a 2018 MacBook Pro a small HDRP project with 2 plugins active (Amplify Shader, DOTween) takes me about 25-30s to enter play mode where the scene contains a single mesh asset and whatever HDRP assets/configs are needed for the default lighting etc. so it’s minimal at best. It certainly feels slower to do anything in the editor vs 2020.3 LTS projects, which were in turn slower than 2019 and 2017 projects.

Yep, I know that fast domain reloads (edit: “Enter Play Mode Settings”) are a new feature but it’s not practical to refactor existing projects or when using a few Asset Store or external dependencies that don’t support it.

1 Like

I’m not sure if you’re aware of it, excuse me if I tell you something you already know.

Unity implemented “Enter Play Mode Settings” in Unity 2019 that allow to skip the script and scene reload when pressing Play, which makes entering and stopping play mode almost instantaneous:

However, it does not fix the reload time when changing a script.

2 Likes

Hey Peter, thanks - yeah I mentioned that at the end of my post (sorry, called it fast domain reloads, I meant fast play mode). We’re aware of the fast play mode stuff that avoids the domain reload but obviously all of your project and plugins and packages need to play by the same rules, so it’s a useful feature but not practical in every situation.

Also, I’m not using any new Apple Silicon hardware myself but I have heard good things about the speedy performance of the native Unity 2021.x editor. Is anyone else here using 2022 beta on Apple Silicon hardware, and if so, how is the performance?

yeah, try that in a production. I mean any, that is using some 3rd party assets. It is impossible to work without domain/scene reload when it’s not supported by every asset out there. It’s one of the features that “theoretically” makes sense but in real-life scenarios isn’t possible in my opinion. Besides the whole idea seems like a band-aid, not the real solution. Despite the fact that (as stated before) - it isn’t really usable.

2 Likes

I kinda blame those features for play times getting slower again. Makes me feel like Unity thinks going to play mode is fast now, so they can slip up again when it’s convenient.

5 Likes

Quick test on a 2k LOC proto: domain reload is now only 30% slower than 2020.1.17
Not bad at all.
Still regression but finally going in the right direction.

2 Likes

sorry if I sound silly right now but what is 2k LOC proto? :slight_smile: domain reload time is pissing me off so hard that I am trying to grasp every bit of information out there :slight_smile:

the least amount of assemblies (including asmdef and thus packages too) is what helps most with reducing the domain reload time @nehvaleem but ive also seen some projects abuse initialize on load and then attribute that to the domain reload because unitys progress bar doesnt update as a separate process

yeah I know, I try to minimize use of the assemblies (I think I know how they work, when to use references, when to use separate assemblies) and I do not use initializeonload almost at all. Still the domain reload is pita on larger projects

Not at all, some times I write too tersely and acronyms are not helping. It means game prototype of only 2000 line of code (LOC). In fact after installing the statistic plugin the project is 21kLOC, 10x what I thought. Still a very small project.

1 Like

Out of curiosity, how do you read\calculate the number of code lines?

https://plugins.jetbrains.com/plugin/4509-statistic/

1 Like

fo you to know, we are using unity 2022 beta and we still having the exact waiting time after compilations, or even more

3m and 30s for compiling a single script that is in a super small separated assembly

this is ridiculous

1 Like

Have you used the special profiler to identify which step takes that time?