Search Unity

Saving Prefabs Makes Editor Freeze For 10+ Minutes

Discussion in 'Editor & General Support' started by ShadyAlien, Apr 15, 2019.

  1. ShadyAlien

    ShadyAlien

    Joined:
    Aug 28, 2009
    Posts:
    210
    I'm using Unity 2019.1.0f1, but I've been experiencing this issue with 2018.3 as well; I updated to 2019 to see if the issue would persist in a newer version, and so far it has.

    Whenever I save a prefab, regardless of its complexity, it makes the editor freeze for a very long time. Compiling changes to scripts can take a while as well, but not as long as updating prefabs.

    What's odd is this: at one point, I had some compile errors that stopped unity from compiling all of the scripts in the project, and during that time, prefabs saved instantly. Because none of the scripts were being compiled, it seemed to speed up saving prefabs significantly. As soon as I fixed the compile errors, everything went back to being slow. I'm assuming that when a prefab is saved, the asset database is refreshed, and possibly scripts are being recompiled that don't need to be? I have a fairly large project so this could be a slow process, but it seems disproportionately slow when dealing with prefabs.

    Similar issues occur when I update import settings on meshes or textures, but with the freeze last about 1-2 minutes instead.

    Has anyone else experienced issues like this? I'm guessing there's something not optimized with my project, but I'm having trouble pinpointing what that might be.
     
  2. ShadyAlien

    ShadyAlien

    Joined:
    Aug 28, 2009
    Posts:
    210
    Update: if I make a new, empty scene before opening creating a prefab, stuff seems to save much faster. I'm not sure why scene complexity would affect editing prefabs, but it seems to be at least part of the problem.