Actor Deletion in large level slow

Hi there,
We are editing a fairly large level, and deleting actors has become a painful operation with many operations taking up to 10s. The main culprit seems to be looking for soft references in the following callstack:

   FAssetRenameManager::CheckPackageForSoftObjectReferences(UPackage * Package, const TMap<FSoftObjectPath,FSoftObjectPath,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FSoftObjectPath,FSoftObjectPath,0> > & AssetRedirectorMap, TArray<UObject *,FDefaultAllocator> & OutReferencingObjects) Line 1004
FAssetRenameManager::LoadReferencingPackages(TArray<FAssetRenameDataWithReferencers,FDefaultAllocator> & AssetsToRename, bool bLoadAllPackages, bool bCheckStatus, TArray<UPackage *,FDefaultAllocator> & OutReferencingPackagesToSave, TArray<UObject *,FDefaultAllocator> & OutSoftReferencingObjects) Line 632
FAssetRenameManager::FindSoftReferencesToObject(FSoftObjectPath TargetObject, TArray<UObject *,FDefaultAllocator> & ReferencingObjects) Line 248
UAssetToolsImpl::FindSoftReferencesToObject(FSoftObjectPath TargetObject, TArray<UObject *,FDefaultAllocator> & ReferencingObjects) Line 635
UUnrealEdEngine::edactDeleteSelected(UWorld * InWorld, bool bVerifyDeletionCanHappen, bool bWarnAboutReferences, bool bWarnAboutSoftReferences) Line 776

Our total actor count is about 7k, and most of it is broken up into smaller sub-levels with the largest about 1.7k actors. The code in question seems to be serializing the level to check for soft references in order to warn the user about them.

Questions:

  1. Is there a safe way to speed this up? It looks like edActDeleteSelected has a flag for warning about soft references that defaults to true. Would changing this to false (or adding a modifier key to force it false) cause any major issues?
  2. Is this hang expected for a level with 1.8k actors, or is there maybe something else going on internally like a specific actor class causing hangs?

Thanks,

  • Chance

4 years later, there is still no reply :frowning:

I was facing and digged into this problem. It seems unreal will try to load all soft reference in map and to invalidate/rename related soft references when deleting/renaming actors.

This behavour can be toggled in Project Settings -> Editor -> Blurprint Project Settings -> Validate Unloaded Soft Actor References.
It speeds up the deleting progress when toggled off, at the risk of breaking soft actor references pointing at deleted actors.

In large maps, it may take minutes to delete an actor, so I decide to turn it off.

4 Likes

I encountered the same issue; it took ten hours to delete a large world map.

THANK YOU, KIND SIR! God bless! I was searching for a solution to this issue! I literally spent a DAY opening an Old project and deleting all the stuff on the map.