Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Standard Assets no longer reducing compile time

Discussion in '5.4 Beta' started by shawnblais, Jul 19, 2016.

  1. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    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:
    1. Open project, modify any line of code in SceneManager.cs
    2. Observe compile times.
    3. Rename "Standard Assets" to "_Standard Assets", wait for scripts to re-import.
    4. Modify SceneManager.cs again
    5. 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
     

    Attached Files:

    Last edited: Jul 19, 2016
    Shushustorm likes this.
  2. Alex-Lian

    Alex-Lian

    Guest

  3. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Excellent :)
     
  4. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    This was a bug since 5.3 as well; I can verify it was just fixed in 5.3.5 patch 7 a few days ago; glad that fix is getting ported to RC2. Compile times are killing me... any time the compile is long enough to cause me to check Facebook my productivity becomes about zero. :oops:
     
  5. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Praise the lord it's been fixed! In 5.4.0f2 the 7 second compile times are back :)
     
    makeshiftwings likes this.