When opening levels in the Unreal Engine editor, the process is extremely slow. Upon investigation, it was found that the delay is caused by the RebuildAlert function, which calls Substance::Helpers::SubstancesRequireUpdate. This function iterates through all Substance assets and calls GraphRequiresUpdate on each.
The issue lies within GraphRequiresUpdate, as it internally calls AssetRegistryModule.Get().SearchAllAssets(true). In Unreal Engine 5.4.4, this function introduces a 100 ms sleep. With 1000 Substance assets in the project, this results in a delay of 100 seconds when opening a level.
I noticed that in all occurrences (two) of GraphRequiresUpdate being called higher up in the stack, AssetRegistryModule.Get().SearchAllAssets(true) had already been invoked. Therefore, I commented out the AssetRegistryModule.Get().SearchAllAssets(true) call within GraphRequiresUpdate, which eliminated the significant delay when opening levels.
Steps to Reproduce:
- Use a project with a large number of Substance assets (e.g., 1000).
- Open a level in Unreal Engine 5.4.4 with the Substance plugin enabled.
- Observe the extended loading time.
Proposed Solution:
Remove or optimize the redundant call to AssetRegistryModule.Get().SearchAllAssets(true) within GraphRequiresUpdate to prevent unnecessary delays.
Environment:
- Unreal Engine version: 5.4.4
- Substance Plugin version: 71
- OS: Windows 11 23H2
Impact:
This issue significantly affects productivity when working with large projects that rely on Substance assets.