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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.