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

Bug Incredibly slow refresh, editor completely freezes

Discussion in 'Editor & General Support' started by EternalClickbait, Aug 27, 2020.

  1. EternalClickbait


    May 5, 2019
    I've been having a problem lately where the editor takes ages to refresh and sometimes completely freezes. I can't alt+tab to it, and clicking on it from another window does nothing (windows doesn't show unity as focused). I checked my logs, and it takes anywhere from 1 minute to 5 minutes to refresh:
    Code (csharp):
    1. Refresh completed in 319.796790 seconds.
    2. RefreshInfo: RefreshV2(ForceSynchronousImport)
    3. RefreshProfiler: Total: 0.000ms
    4.    InvokeBeforeRefreshCallbacks: 319794.774ms
    5.    ApplyChangesToAssetFolders: 1.413ms
    6.    WriteModifiedImportersToTextMetaFiles: 0.084ms
    7.    CleanLegacyArtifacts: 0.000ms
    8.    Scan: 0.000ms
    9.    OnSourceAssetsModified: 214.563ms
    10.    UnregisterDeletedAssets: 3.148ms
    11.    InitializeImportedAssetsSnapshot: 0.000ms
    12.    GetAllGuidsForCategorization: 16.281ms
    13.    CategorizeAssets: 0.811ms
    14.    ImportAndPostprocessOutOfDateAssets: 83.216ms (319398.929ms without children)
    15.        ImportManagerImport: 224360.092ms (2272.351ms without children)
    16.            ImportInProcess: 35.052ms
    17.            ImportOutOfProcess: 2237.229ms
    18.            UpdateCategorizedAssets: 0.000ms
    19.            RemoteAssetCacheGetArtifact: 0.070ms (0.000ms without children)
    20.                RemoteAssetCacheResolve: 0.000ms
    21.                RemoteAssetCacheDownloadFile: 0.000ms
    22.        CompileScripts: 0.000ms
    23.        PostProcessAllAssets: 92626.646ms
    24.        ReloadImportedAssets: 81.572ms
    25.        VerifyAssetsAreUpToDateAndCorrect: 30.416ms
    26.        EnsureUptoDateAssetsAreRegisteredWithGuidPM: 0.000ms
    27.        InitializingProgressBar: 1.707ms
    28.        PostProcessAllAssetNotificationsAddChangedAssets: 0.003ms
    29.        OnDemandSchedulerStart: 0.938ms
    30.        RestoreLoadedAssetsState: 0.913ms
    31.    InvokeProjectHasChanged: 8.076ms
    32.    UpdateImportedAssetsSnapshot: 0.000ms
    33.    ReloadSourceAssets: 16.216ms
    34.    UnloadImportedAssets: 6.687ms
    35.    Hotreload: 0.950ms
    36.    FixTempGuids: 8.044ms
    37.    VerifyGuidPMRegistrations: 0.015ms
    38.    GatherAllCurrentPrimaryArtifactRevisions: 0.000ms
    39.    UnloadStreamsBegin: 0.953ms
    40.    LoadedImportedAssetsSnapshotReleaseGCHandles: 0.042ms
    41.    GetLoadedSourceAssetsSnapshot: 1.231ms
    42.    PersistCurrentRevisions: 14.451ms
    43.    UnloadStreamsEnd: 0.000ms
    44.    GenerateScriptTypeHashes: 0.021ms
    The only code that should run before/after importing assets is Mirror and NugetForUnity. I've used Mirror in other projects and had no problems with it, and NugetForUnity only runs when I do it manually. The project is only 700mb total, with most of it being in the /Library folder. I have a max of 80 scripts, half of which are in a DLL.

    I've also noticed that loading the project takes 90 seconds, when the numbers don't add up:
    Code (csharp):
    2. [Project] Loading completed in 93.495 seconds
    3.     Project init time:                 1.814 seconds
    4.         Template init time:         0.000 seconds
    5.         Services packages init time:     0.000 seconds
    6.         Package Manager init time:         0.000 seconds
    7.         Asset Database init time:         0.000 seconds
    8.         Global illumination init time:     0.000 seconds
    9.         Assemblies load time:             0.000 seconds
    10.         Unity extensions init time:     0.031 seconds
    11.         Asset Database refresh time:     0.000 seconds
    12.     Scene opening time:             3.031 seconds
    Does anyone have a fix for this issue? I can barely get any work done due to this.
    ROBYER1 and JesseSTG like this.
  2. triangle4studios


    Jun 28, 2020
    I don't know but I am here because I too am having refresh problems on the new update. Same project, 10x the wait time. On a 64 Core 128GB ram M.2 Based System.
    Project is 200mb and 20 scripts. Something changed unity. Please fix it.
  3. Ozee


    Jul 30, 2015

    I am having the same editor problem!

    I have noticed that a small minority of Unity developers have this same problem. I do not think that this has anything to do with Unity editor. Maybe a missing update, maybe a missing Visual Studio component, a faulty driver installation or maybe simply a specific build of Windows causes this issue?

    Win10 build 19041
    3.00 ghz 8 core CPU,
    64 gb ram,
    gtx 1080ti,
    m.2 ssd
  4. numbers1234


    Jan 5, 2019
  5. Abended


    Oct 9, 2018
    I am seeing this as well using 2019.4.8f1 and vs 2019 community. I have a copy of the project from 2019.3 it does not have the issue, vs runs fine with that solution file. VS is also reporting very high power usage, not sure if that is normal.

    Update, upgraded to 2019.4.9f1. copy of main project seemed to load quickly in vs, and typing seemed normal. upgraded main project, still very laggy and is not responding frequently.
    Last edited: Sep 10, 2020
  6. EternalClickbait


    May 5, 2019
  7. Abended


    Oct 9, 2018
    My issue was resolved, ended up being some sort of cache within VS. I literally renamed the unity project's folder and it fires right up as VS sees this as a different solution. If you make a copy of your project and fire it up and drop into VS and it seems to work smoothly, this could be your issue as well. I suffered through months of the slowest IDE I've ever used and a folder rename resolved it, ridiculous!