We investigated a recurring stall when deleting actors in a large World Partition level (Polaris project). Users report the editor becomes stuck on “Computing References” for several seconds (6–10s typical, but we’ve seen reports of much longer stalls on other large WP projects) when deleting actors — even actors with zero actual references pointing to them.
Root Cause
We profiled the stall (CPU trace attached) and traced the hot path to:
UUnrealEdEngine::DeleteActors →
FAssetRenameManager::FindSoftReferencesToObjects →
FAssetRenameManager::PopulateAssetReferencers() →
FAssetRenameManager::GatherReferencingObjects()
We reviewed the engine source for
PopulateAssetReferencers()(Engine/Source/Editor/UnrealEd/Private/AssetRenameManager.cpp) and found the likely cause of the disproportionate cost:
if (AssetToRename.bOnlyFixSoftReferences)
{
AssetToRename.NotRenamedReferencingPackageNames.Add(OldPackageName);
AssetToRename.NotRenamedReferencingPackageNames.Add(AssetToRename.NewObjectPath.GetLongPackageFName());
// Add dirty packages and the package that owns the reference. They will get filtered out in LoadReferencingPackages if they aren't valid
for (UPackage* Package : ExtraPackagesToCheckForSoftReferences)
{
AssetToRename.NotRenamedReferencingPackageNames.Add(Package->GetFName());
}
}
The genuine Asset Registry query
AssetRegistryModule.Get().GetReferencers(...)is cheap and indexed. However, this function unconditionally appends every currently dirty (unsaved) world and content package in the editor session as an additional soft-reference candidate — regardless of whether the Asset Registry indicated any relationship to the object being deleted.
GatherReferencingObjects()then has to load/inspect each of these candidates to rule them out as false positives.
We’d like guidance on whether
PopulateAssetReferencers()could be changed to only include dirty packages as candidates when there’s a plausible reason to suspect a relationship (e.g., a lightweight in-memory check) rather than unconditionally including every dirty world/content package in the session. Please let us know if a minimal repro project would help, or if there’s an existing UE-JIRA tracking this behavior.
Steps to Reproduce
- Open a large World Partition map with a substantial amount of streamed/loaded content (in our case, set-dressing actors across many WP cells).
- Work in the editor for a period of time performing normal edits — moving actors, adjusting properties, placing/adjusting set dressing — without saving. This causes multiple world and content packages to become “dirty” (unsaved).
- Select any actor (does not need to have any actual references pointing to it) and delete it (Del key, or right-click → Delete).
- Observe the “Computing References” progress dialog. On our test machines this consistently takes ~6–10 seconds, scaling with how much unsaved/dirty content is present in the session, and independent of whether the deleted actor actually has any referencers.