I put this post under Question, but not sure if it’s actually a bug.
My project is a new prototype and very minimal - about 10 scripts, 5 materials, 1 small model. URP, Cinemachine, New Input.
Whenever I open it (after a PC restart or sleep) it can take a several minutes to load.
I noticed a few things in the Editor log taking relatively long time:
-
Domain Reload Profiling: 5392ms
-
Then another Domain Reload Profiling: 11716ms
-
Asset Pipeline Refresh (id=c3ba194a1643b164291b40babf2363d2): Total: 115.525 seconds (most of it “Untracked”, and another Domain Reload in there?).
I mostly wanted to ask whether this is expected in 2022?
It definitely wasn’t like that on older versions (2021 opened faster for me with a full-fledged game with hundreds of assets), but I’m not sure if I have something set up wrong or if 2022 is just slower.
(I have an i9, 32GB and an SSD, so unlikely a hardware issue)
(also as an aside I think it would be really helpful if timings were standardised - either as 0.5s or 500ms - to be able to analyse logs faster)
Asset Pipeline Refresh (id=c3ba194a1643b164291b40babf2363d2): Total: 115.525 seconds - Initiated by InitialRefreshV2(ForceSynchronousImport)
Summary:
Imports: total=0 (actual=0, local cache=0, cache server=0)
Asset DB Process Time: managed=0 ms, native=97449 ms
Asset DB Callback time: managed=26 ms, native=0 ms
Scripting: domain reloads=1, domain reload time=11809 ms, compile time=6187 ms, other=52 ms
Project Asset Count: scripts=3773, non-scripts=1285
Asset File Changes: new=0, changed=0, moved=0, deleted=0
Scan Filter Count: 0
InvokeBeforeRefreshCallbacks: 0.314ms
ApplyChangesToAssetFolders: 0.059ms
Scan: 10326.699ms
OnSourceAssetsModified: 0.004ms
GetAllGuidsForCategorization: 0.944ms
CategorizeAssets: 149.671ms
ImportOutOfDateAssets: 6116.883ms (-88.198ms without children)
CompileScripts: 6187.301ms
ReloadNativeAssets: 0.013ms
UnloadImportedAssets: 15.907ms
EnsureUptoDateAssetsAreRegisteredWithGuidPM: 1.031ms
InitializingProgressBar: 0.011ms
PostProcessAllAssetNotificationsAddChangedAssets: 0.000ms
OnDemandSchedulerStart: 0.820ms
PostProcessAllAssets: 26.288ms
GatherAllCurrentPrimaryArtifactRevisions: 0.001ms
UnloadStreamsBegin: 0.992ms
PersistCurrentRevisions: 0.151ms
UnloadStreamsEnd: 0.014ms
GenerateScriptTypeHashes: 1.696ms
Untracked: 98903.459ms
There’s also the Domain Reload:
Domain Reload Profiling: 11716ms
BeginReloadAssembly (123ms)
ExecutionOrderSort (0ms)
DisableScriptedObjects (5ms)
BackupInstance (0ms)
ReleaseScriptingObjects (0ms)
CreateAndSetChildDomain (22ms)
RebuildCommonClasses (30ms)
RebuildNativeTypeToScriptingClass (10ms)
initialDomainReloadingComplete (22ms)
LoadAllAssembliesAndSetupDomain (5471ms)
LoadAssemblies (5349ms)
RebuildTransferFunctionScriptingTraits (0ms)
AnalyzeDomain (187ms)
TypeCache.Refresh (166ms)
TypeCache.ScanAssembly (158ms)
ScanForSourceGeneratedMonoScriptInfo (13ms)
ResolveRequiredComponents (8ms)
FinalizeReload (6059ms)
ReleaseScriptCaches (0ms)
RebuildScriptCaches (0ms)
SetupLoadedEditorAssemblies (4818ms)
LogAssemblyErrors (0ms)
InitializePlatformSupportModulesInManaged (4ms)
SetLoadedEditorAssemblies (3ms)
RefreshPlugins (0ms)
BeforeProcessingInitializeOnLoad (68ms)
ProcessInitializeOnLoadAttributes (4658ms)
ProcessInitializeOnLoadMethodAttributes (82ms)
AfterProcessingInitializeOnLoad (2ms)
EditorAssembliesLoaded (0ms)
ExecutionOrderSort2 (0ms)
AwakeInstancesAfterBackupRestoration (4ms)