Quick answer: Unity hangs forever on Reimport All with large projects? Custom ScriptedImporters that block on AssetDatabase methods cause deadlock - use AssetDatabase.ImportAsset with the NoRecursion flag.

Right-click Assets, Reimport All. The progress bar reaches 30%, then hangs. Forever.

Use NoRecursion

AssetDatabase.ImportAsset(path,
  ImportAssetOptions.ForceUpdate | ImportAssetOptions.DontDownloadFromCacheServer);

Importing from inside a custom importer recursively without NoRecursion deadlocks the import pipeline.

Defer to OnPostprocessAllAssets

Custom importers shouldn't trigger other imports. Defer the dependent work to OnPostprocessAllAssets which runs after the current batch completes.

Profile with the Asset Pipeline V2 log

-EnableAssetPipelineV2Log on the editor command line. Logs the import graph; deadlocks appear as cycles.

“AssetDatabase is reentrant-hostile. Importers that re-trigger imports break it.”

Build a small reproduction project before debugging a deadlock in main. Stripping unrelated importers identifies which custom one is the culprit.