When editing a level with many actors (1000+), deleting an actor results in a noticeable hitch: the editor becomes unresponsive for seconds. This hitch becomes longer the more actors are loaded and exceed 10+ seconds on maps with tens of thousands of actors. This impacts productivity on projects which commonly have large worlds with many actors.
Most of that time is spent in
FBlueprintEditorUtils::GetActorReferenceMap()
which is called in
UUnrealEdEngine::DeleteActors()
to detect references to the to-be-deleted actor and present a warning popup:
Actor {0} is referenced by the level blueprint and other Actors/Objects. Do you really want to delete it? This will break references.
Temp workaround
As a temporary workaround, the hitch can be avoided by disabling the warning functionality by opening Editor Preferences and disabling bCheckReferencesOnDelete, or directly in DefaultEditor.ini or Saved/Config/EditorPerProjectUserSettings.ini:
[/Script/UnrealEd.LevelEditorMiscSettings] bCheckReferencesOnDelete=False
Goal
However, as the warning for existing reference to the actor is quite useful, it would be better to investigate ways to optimize actor deletion that don't result in a seconds-long editor hitch for large maps while retaining the existing references warning.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-200679 in the post.