Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Compile/Refresh Time Very Long (>75 seconds)

Discussion in 'Editor & General Support' started by hugeandy, Sep 28, 2020.

  1. hugeandy

    hugeandy

    Joined:
    Nov 2, 2016
    Posts:
    130
    Hi all!

    I'm having problems with very long down time between making a script edit, and being able to interact with Unity again.

    The following test is after making a single edit to a single (non-editor) script. Profiling during this recompile/refresh reveals a few long frames, this one being most notable with 75s and 0.7GB allocations.

    upload_2020-9-28_18-50-26.png


    I realise that this will not be instant, or even very quick, but I think that it should be doing it much quicker than around 80 seconds!

    Whilst it is compiling/refreshing, the progress bar is animating with the caption "AssetDatabase.Refresh" for most of the duration.

    About the project:
    Some of the code is in assembly defs, most of it not.
    Assets folder is 11.5GB.
    Unity Version: 2020.1.6f

    I have seen some people suggest a full reimport - I recently updated to 2020 from 2019 and it did what seemed to be a full import then. Maybe it wasn't a full one however, and if it's recommended I can reimport all tomorrow.

    Anyone got any tips to speed me up?

    Cheers,
    Andy
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Project on SSD, and you got a good CPU?
     
  3. hugeandy

    hugeandy

    Joined:
    Nov 2, 2016
    Posts:
    130
    Yep on a SSD, CPU is a Ryzen 7 2700X
     
  4. astrogee

    astrogee

    Joined:
    Feb 4, 2018
    Posts:
    16
    Just wanted to chime in here a bit. I'm not seeing these extreme compile times, but I have a brand new project with no more than 5 custom scripts, and every change I make makes unity unresponsive for about 10 seconds. Is this normal? I have a few preview packages (hybrid renderer, entities, physics and UIToolkit) and TextMeshPro. Running an i9 MacBook pro from last year