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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Recompile "reload" spending 6.6minutes, yesterday was 25s...?

Discussion in 'Editor & General Support' started by malkere, Jun 10, 2022.

  1. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,211
    I've been fighting with this all day and still not sure what I can do. I can profile the editor and my scripts still all finish compiling at around 30s, but then AssetDatabase.Refresh() kicks in and it sits there unresponsive for another 6 minutes.

    Should I be looking for code marking Assets dirty?
    It acts like it's rebuilding half my library without giving any sort of indication as to what's going on.
    This is 2019.4.39
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    37,194
    Pretty maddening... there's pinned posts with dozens of pages of responses at the top of the forum. Perhaps there's something useful in there?
     
  3. evyatron

    evyatron

    Joined:
    Jul 20, 2014
    Posts:
    132
    A few things I'd try:
    1. Restarting Unity and/or your PC (I know this might be obvious, but worth saying!)
    2. Disabling any anti-virus software to see if something's blocking the hard-drive access
    3. Manually deleting the Library folder, letting Unity do a clean re-import once
     
  4. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,211
    Back from the weekend. I have read a lot of the threads, but there are a lot of them, and (no offense) most of them are responses like evyatron's. This has been going on for now days, over 16 hours at the time of posting, I have of course rebooted and restarted Unity many many times. Disabling anti-virus to run Unity is ludicrous and my anti-virus plus Unity have thousands of hours of runtime together. I have yet to try a library wipe, and now desperate will probably try one.
     
  5. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,211
    Digging into this further. Via Editor logs I've found this:

    Domain Reload Profiling:
    ReloadAssembly (27126ms)
    EndReloadAssembly (26986ms)
    SetupLoadedEditorAssemblies (26320ms)
    ProcessInitializeOnLoadAttributes (2293ms)
    ProcessInitializeOnLoadMethodAttributes (23498ms)

    eh nm.. that's still only 27s
    well, I guess that shows it's not domain related, it's definitely assets. For the record, after several suggestions, I have reset the editor window to no effect, and this is all on SSD.
     
    Last edited: Jun 13, 2022
    evyatron likes this.
  6. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,211
    Well, I was messing with a bunch of UMA this week so after a full reimport that did not fix the problem I deleted all my UMA stuff and reimported and now things are back down to 15s compile. My theory is that an error I ran into was creating some kind of shadow custom drawer that was storing itself static/project wide, or something like that. There is a custom drawer for "wardrobe recipes" in UMA that was erroring after I wrote a script to add a race to a bunch of recipes, accidentally adding the race multiple times to some recipes. This threw a Dictionary key error whenever inspecting the cursed recipes, and seemed to be making things worse and worse. I'd try to recreate this in a small project, but I've already lost a full two days fussing with this.
     
    Kurt-Dekker likes this.