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.
error message when install in U.E 5.3 - IS-IN-FCO2-82
How does TextureRenderTarget2D get TArray<uint8> type data?
How do I set a material as a post-processing material?
Why does the REMOVE method of map container remove elements have memory leaks?
How to delete some elements correctly when deleting an array loop?
What is the difference between Camera and CineCamera?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-200679 in the post.