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
- Popup windows spawn on the incorrect monitor when the Editor is placed near the boundary of scaled monitor next to a monitor with different scaling
- Hidden Tabs do not shift into empty space after closing visible Tabs
- [Android] Application not deployed on a device when "activity-alias" is used in the AndroidManifest
- Shader compile process adds shader ID to the constant buffer name when the word "Globals" is being used in Vulkan
- Audio Mixer Snapshot link to the documentation isn’t working
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.