In 5.4.f1 placing my scripts into Standard Assets, no longer reduces compile times like it did in 5.3.5.
It seems as though the Standard Assets DLL is generated each compile, even if the contents have not changed, which is incorrect behavior according to the docs.
I’ve created a reproduction project, that consists of 2000 C# classes.
TEST RESULTS
Unity 5.4.f1, using “Standard Assets”: ~17 seconds compile time
Unity 5.4.f1, NOT using “Standard Assets”: ~12 seconds compile time
Unity 5.3.5, using “Standard Assets”: ~7 seconds compile time
Unity 5.3.5, NOT using “Standard Assets”: ~12 seconds compile time
In 5.3.5, using SA reduced compile times by 40%. In 5.4.1 it actually increases them by 40%.
HOW TO REPRODUCE:
- Open project, modify any line of code in SceneManager.cs
- Observe compile times.
- Rename “Standard Assets” to “_Standard Assets”, wait for scripts to re-import.
- Modify SceneManager.cs again
- Observe compile times
ISSUES
- Using “Standard Assets” to store static scripts should reduce compile times, not increase them.
- Why is the compile time is as high as 7 seconds in 5.3.5? Although this is much better than the 12s without StandardAssets, it still seems much longer than it should be. Technically only 1 cs file needs to be recompiled here, so what is taking 7 seconds? If I delete the contents from Standard Assets, compile times drop to ~2 seconds.
Logged bug here: https://fogbugz.unity3d.com/default.asp?815817_te3bubhrig731esv
2716283–192750–CompileTimeTest.zip (1.49 MB)