We discovered a pretty big performance hit in editor when loading level instances for a world partition map, specifically:
EditorActorFolders.cpp:
- FActorFolders::OnAllLevelsChanged()
- this method gets called any time an LI is loaded in the editor
- this method will do housekeeping and a full rebuild of the folder list for the world (expensive)
- This method will also get called multiple times for nested LIs, which adds to the cost of nested LIs impacting load times.
Proposed optimization:
- We added a global variable in a WITH_EDITOR block, for GIsBulkLoadingLevelInstances
- Within LevelInstanceSubsystem.cpp, add a TGuardValue<bool> to flip it on when doing bulk loading of LevelInstancesToLoadOrUpdateCopy
- After bulk loading is completed, broadcast an event & bind OnAllLevelsChanged to that event, so it can run the rebuild once.
Making this change on our end showed savings of between 40-60% for loading of level instances for out large/dense maps.