As far as script compile times/domain reload stuff is concerned, possibly my biggest time wasters when it comes to the development process, 2019. When it comes to what I’m afforded as far as the stuff I’m developing is concerned, my best results come from making judicious use of things like Jobs, so I tend to use 2021.
This will heavily depend on which packages you have in your project. That is one of the main things that impacts editor loading and iteration times. Remove them all and newest Unity versions will be as fast if not faster than older ones.
Creating a completely empty project seems to have been getting a little bit faster over the years. From a quick test:
Of course that doesn’t help you if you are relying on a packages a lot. But if you don’t (for instance, you’re using Unity 2017 which doesn’t even have a package manager), you should be able to upgrade without any slowdown to your project.
I’ll go ahead and say I’m not sure what this helps at all. Creating a completely empty project is faster? Well whoopee! I can’t wait to do that thing that is probably the least frequent thing I do with Unity four seconds faster.
My point was that I don’t think Unity is getting slower with time. I’d be surprised if other operations that you do more frequently are slower in newer Unity versions provided the same set of installed packages. Creating and opening an empty project was just a quick test to benchmark opening projects which was actually the first thing OP asked about.
Script compilation times and time to enter play mode are both so bad that Unity has actually commented on how bad it is in the past and then promptly never spoke of again.
It is significantly slower than unity 5. Around unity 5 script compilation time pretty much did not exist until you had something huge in script. Startup time also became significantly slower.
It may seem like that if you’ve been steadily upgrading your hardware. My progression was Phenom II X4 965 → Ryzen 1600X → Ryzen 3600 → Ryzen 5950X. I recently installed Unity 5 (which isn’t trivial due to activation) and compiling a script in an otherwise empty project was <500ms whereas recent releases are 3 seconds.
Oh don’t get me wrong, they’re awful in general (and it is something that we’re putting huge efforts in solving). I just think the underlying reason for that is packages creep, not the core itself getting slower. A default 3D template has something like a million llines of C# code in it… compiling that takes time.
For me, it was 2019.4, even in my potato laptop it was very fast to open my projects, if i tried open those projects in my new pc on unity 2021 LTS, it is slower, yeah, the same project
Meaning, if I were to start a new empty project for each editor version and then add my assets into it, I shouldbe seeing slower editor turnaround times than if I were to take my 2017 project and upgrade it all the way?
Because that „upgrading a 2017 project“ is what I did, and that may explain why I‘m measuring basically the opposite of what user are reporting from their experience (yeah, 2019 is actually the slowest editor version in all aspects I have measured so far and 2023.1 is by far the fastest all around!).
I will have to re-run tests where I first create a new project and then put my test assets into that.
weird, i started my first project in 2018 (URP Project), then i updated it to 2019 and i did tests back then (because i’m very skeptical of updates) and it was way faster, i also remember that i hated 2020 because it was painfully slow. Would that be something with URP maybe?
As already mentioned, it depends a lot on the installed packages, I have a project with HDRP and ECS and with Unity 2022.3 LTS and a URP 2D project without ECS and the 2D packages with 2023.2 Beta. Here the 2023.2 version feels much faster. However, with 2022.3 there is a difference whether you use URP or HDRP, I find the editor with URP generally faster than with HDRP.
When I start a new project, the first thing I do is uninstall all packages that I don’t need. Sometimes I wish I could already select/remove the packages when creating a project. As a hobbyist who experiments around a lot, I often create new projects.
Depends on how you create the “empty project”. Our “empty” templates in the hub keep adding more and more packages and that significantly impact editor performance. Using “-createProject -upmNoDefaultPackages” will create a truly empty project.
If you’re upgrading a project, after opening the editor I would open the package manager manifest, delete all but 1 package (leave 1 is important because if you delete them all, editor will automatically re-add all the default ones) and then slowly add 1 by 1 to recover the functionality your project needs. In most cases that will give you a sizeable perf boost.
Totally. As a package URP is heavily evolving and for instance shader X in version N+1 is likely to be pretty different from version N. Then at some point it had also introduced severe shader compilation times regression, but thankfully it’s been fixed since.
Yeah, same here. Perhaps that’s why I could never quite relate to the traditional thinking that 2019 is by far the fastest. It certainly never felt that way for me. And editor perf issues most often turned out to be an issue with the project itself - a script, a setting, a package, or just the corporate antivirus getting triggered by the project’s contents a lot.
Thanks for the info, how can i do the “-createProject -upmNoDefaultPackages” thing? i want to try that but i didn’t understand anything of what you wrote xD
Instead of the creation of the empty project, a better benchmark would be a trivial change to a trivial script in an otherwise empty project. Change
public float picked => 1 + Random.next;
to
public float picked => 2 + Random.next;
Hit the pause button. Then time the full cycle from hitting Save on the script to getting past the first frame of the game Play mode. It’s this full iteration that is dreadful. Two full domain reloads every change.