Project takes over 10 minutes to open

Hey all!

I am having an issue when opening our project - it takes over 10 minutes to open, with the progress bar showing “Refresh Asset Database”. No one else on the team is having this issue. Annoyingly, I cannot profile at this stage as Unity isn’t open. I’m unsure of where to look, as there isn’t much info to go on.

I have included part of the log file below, which shows that most of the time is spent in “Project init time”.

I’m an almost certain that this is only happening since we upgraded the project from 2020.1.11f1 to 2020.2.6f1.

Another potentially related problem I am experiencing is that sometimes when I hit Ctrl+S (or call AssetDatabase.SaveAssets from a script) it can take 8-10 minutes before Unity is repsonsive again.

Unity also takes a similar amount of time to close (the progress bar showing “Application.Quit”). I guess it could be saving the assets here, so maybe related to the issue above.

Is anyone having similar issues, or have any suggestions of where to look next?

Cheers,
Andy

[Project] Loading completed in 635.959 seconds
    Project init time:                 573.014 seconds
        Template init time:         0.000 seconds
        Package Manager init time:         0.000 seconds
        Asset Database init time:         0.000 seconds
        Global illumination init time:     0.000 seconds
        Assemblies load time:             0.000 seconds
        Unity extensions init time:     0.004 seconds
        Asset Database refresh time:     0.000 seconds
    Scene opening time:             7.609 seconds

Update:

I have kept the profiler running all the time to try to catch this when it happens (it seems to randomly happen on any event which saves assets, for example when duplicating an asset). I finally managed to capture it, and it shows that all the time was taken in “Write asset changes to disk”. Unfortunately it all shows as self time and I don’t see a way of digging into it anymore, but it’s a clue.

This is absolutely way outside my area in Unity but what immediately comes to mind, especially considering other team members don’t get this with the same project, is that something might be corrupt. Maybe come out of Unity, destroy all the temp folders such as “Library”, “Obj”, “Logs” (etc) and load it again. When all that’s done try coming out and going back in again.

Maybe you’ve tried this already but thought I’d mention it. Beyond that, I don’t have any other ideas, sorry.

1 Like

Thanks @MelvMay ,

I have been putting it off but I knew it was inevitable! I’ll do it tonight.

In other news, one of my team members has just reported getting the same issue. They are also going to reimport later

A reimport seems to have significantly improved the project load time - I will keep an eye open for the other issues

1 Like

Hi @hugeandy ,

Does this still happen? Can you repro this problem AND supply a native stack trace?
I put together a guide on how to do that here: Debugging Editor freezes and hangs [Windows Only]
If the editor is stuck a long time doing something, and there’s no good info from the profiler, the native stack trace could help us figure out if it is indeed a mutex or something else that’s taking a really long time.

Hi @Unity_Javier ,

I don’t experience this any more. I do find that project open times increase over time, but deleting library and other temp folders and then reimport brings the time back down again

1 Like

For anyone who is stuck for more than 10 to 15 minutes where a Unity Project has multiple Asset store Assets which in turn generate ~ 50 + Project files

I found that debugging options that I have here makes it instantaneous.
After fiddling with it (because I was fed up not being able to debug) for a few hours here is what I have.
See if these settings make a difference in your UX

Settings above made debugging take about 5 seconds to start :slight_smile:
It was about 9 to 12 minutes before made changes to the options above and I am not exaggerating.
Wish I knew what fixed it. But it is what it is.

Environment: Unity 2022.2.5f1

8801617--1196923--upload_2023-2-13_10-25-33.png