I’m currently updating to 2019.3f3 and am experiencing periodic freezes (around 700ms) with the AssetDatabase v2 refresh, according to the profiler.
Based on the information, I’ve already removed the PolyBrush package, but the lag-spikes are still there (and very noticable) even now that they’re down to 450ms.
In case it helps, I’ve uploaded the before and after profiling .data files as a zip: Archive.zip - Droplr
For the freeze to happen I don’t have to do anything, just having the editor open flashes the cursor to the “waiting circle” every couple seconds or so.
For my hardware configuration: CPU is the Threadripper 2950x (16 cores), Unity is running off of an NVMe SSD, the project is on a Samsung 860 evo.
Edit: I’ve also tried disabling the “Auto Refresh” setting ( see Unity - Manual: Preferences). It still tries to call the refresh method, would that be considered a bug, or am I missing something?)
Edit 2: I’ve done a Deep Profile and figured out that FMOD for Unity is doing the refresh every 5 seconds, which hangs the editor. It looks like it tries to call the “ImportAsset” method, but without forcing an update. Which, in theory, should skip the import if it’s already imported (as far as I understand the import options).
Profiler Dump (1gb): Unity_AssetDatabase_Freeze_DeepProfile_FMOD.data - Droplr
They’re aware of some AssetDatabase slowdowns, such as this one:
However, I hear for the first time of these periodic freezes. Therefore I think it would be worth to submit a bug-report for this issue. If you’re able to reproduce the issue, please submit a bug-report as described in this document:
It’s important that you report these issues together with a reproduction project if you want them to get fixed. If you don’t do it, it might be a long time until someone else reports them or until Unity Technologies find them.
After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. Please post the Case number (number only, not the link) in this forum thread for Unity staff to pick up.
First of: thank you for taking the time to give a detailed way to do bug reports (I’ve done a couple in the past)!
However, there are two parts to this post that I can answer by now:
The periodic refresh happens because of a bug in the FMOD Studio plugin for Unity (there was a forum post about it on their side and they already fixed it on master)
A question about why unity needs to reimport unchanged files.
While I was able to fix the former, the link you’ve provided, answered the latter; it’s not on their roadmap quite yet (quote: “ImportAndPostProcessAssets currently there’s no scheduled improvement for it, but we might be able to skip it completely if we detect there’s no changes to scrips, settings & postprocessed assets.”)
For the time being I’ve adjusted the thread title to reflect these latest developments. I guess for now it’s just wait and see.
Thanks so much for reporting this, I was also able to determine my hanging was due to FMOD, just kind of by “feel” as it were. Removing the build or project path in their settings stopped the hanging. It’s basically a showstopper bug. Is there any workaround at this time? This is a really serious problem.
If Unity has gone 100% insane and not allowed to switch back (something that would usually be absolutely impossible to believe, but Unity has had a bad history of handling deprecation), then you should be able to switch by changing a value in the settings file (ProjectSettings/EditorSettings.asset). Simply change the “m_AssetPipelineMode” value from 1 to 0 and restart unity.
Thanks for the tip! Unfortunately I think this is no longer possible
I’ve tried updating “m_AssetPipelineMode” and restarting Unity, but I think the current version just ignores that option. I had the same AssetDatabase.Refresh() modal afterwards.
May I ask what version of Unity are you changing this on?
That’s… insanity. I personally can’t even open my project with Asset Pipeline v2, it just freezes forever. Why would unity force developers to use this way too new feature??