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

Many more assemblies reloads since 2018

Discussion in 'Experimental Scripting Previews' started by 00christian00, Jun 18, 2018.

  1. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I believe it's since 2018 that I am noticing the editor is reloading assemblies and firing recompilation a lot more than before.
    Is it a side effect of the migration to the new mono runtime?

    When I open Unity it reload everything and it's also recompiling the source even if there was no change which wasn't the case before.
    Whenever I play or pause the editor, it reload everything every time. Maybe this was the case even before, but then it got a lot slower because now it's taking 6-7 seconds on my project to start playback, and my codebase is not that big.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    The new Mono runtime should not have any impact this this behavior. Can you submit a bug report on this issue? That seems like quite a long lag.
     
  3. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I can but I don't think I can isolate the issue and I can't send the whole project, is it ok with just the description?
    Here is my project on a empty scene, play takes almost 5 seconds.
    There is some talk about the slow assembly reload on the incremental compiler thread:
    https://forum.unity.com/threads/unity-incremental-c-compiler.523993/page-5

    I'll see if I can have similar lag on an empty project with just 3rd party assets.
     

    Attached Files:

  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    Unfortunately I don't think a description is quite enough, as this is not something we've noticed internally yet. If you can strip things down to 3rd party assets and still see a problem, that would be best.
     
  5. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I just tried an empty project and it play in 2 seconds, it was almost instantaneous before.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    That sounds like it is worth a bug report, thanks!
     
    00christian00 likes this.
  7. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    Recompiles triggering more often is one issue. We need a repro case for this.

    Assembly reloads taking longer, is a different one. The issue you linked in the incremental compiler thread has been fixed and should be available in a Unity 2018.1 release soon. The release notes for this are:

    Editor: Reduced enter play mode and recompile time by optimizing EditorCompilationInterface.GetTargetAssembly and EditorCompilationInterface.GetTargetAssembliesWithScripts. Has a high impact on projects with lots of scripts and lots of .asmdef files.
    You might also want to check in the Package Manager UI whether you have unnecessary packages included that can lead to additional recompile/enter play mode time.
     
    optimise and 00christian00 like this.
  8. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Thanks to both. I'll wait for the new version then.
    I had just made a comparison between Unity 54 which I still had laying around and 2018 with the same few third party dll and script best http, dotween, leantween, console enhanced, unity ads, unity iap and unity analytics.

    Unity 5.4 did play in 1.5-1.6 seconds
    Unity 2018 in 2.5 seconds

    In 2018 I removed all extra packages except the one listed above.
    Should I report it anyway?
     
  9. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,051
    Will it be backported to LTS? I have serious problems regarding compilation times and play entering time with a very high number of asmdef files.
     
  10. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    For me opening just closed project took about 5 minutes and almost all the time in Compiling AssemblyDefiniton files.