Search Issue Tracker
By Design
Votes
1
Found in
2020.3
2020.3.18f1
2021.2
2022.1
Issue ID
1365046
Regression
No
Packages keeps getting recompiled when editor is recompiling code from the assets folder.
Reproduction steps:
1. Open user-submitted project "Recompilation Test"
2. Create a new C# Script in the Assets folder
3. Inspect the Logged Compilation time in the Console
4. Navigate to Window -> Package Manager
5. Enable all Built-in packages
6. Create a new C# Script in the Assets folder
7. Inspect the Logged Compilation time in the Console
Expected result: The compilation time before and after adding packages were the same
Actual result: Compilation time was higher after enabling built-in packages
Reproducible with: 2020.3.24f1, 2021.2.6f1, 2022.1.0b2
Could not test with: 2019.4.33f1 (Compilation errors)
Note: Such increase in script compilation time is not seen in Editor Iteration Profiler
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Metal Vertex Shader warning is being thrown when creating a VR Template Project
- Asset database warning is thrown when declaring font variable in the USS text file
- Memory Leak warnings are thrown when opening an imported Prefab
- Crash on mono_push_other_roots when setting Normal Thread Affinity
- Editor exits Play mode when another project is being created using Unity Hub 3.8.0-beta.1
Resolution Note:
The way the timings are done here is including domain reload timings.
Domain reload timings are dependent on what code that is loaded into the domain, some code in a package can have some initialization code that will increase the domain reload time.
To get a picture of what is happening its possible to profile the code, using the Unity Profiler, or the Editor Iteration Profiler.
Alternatively there's even https://docs.unity3d.com/ScriptReference/Compilation.CompilationPipeline.html that can be used with a StopWatch to get timings.