Speed up deletion via the Scene Tree Dock in large trees#109511
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Oct 27, 2025
Merged
Speed up deletion via the Scene Tree Dock in large trees#109511Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
00c0b3d to
e9f3112
Compare
KoBeWi
approved these changes
Aug 30, 2025
Ivorforce
approved these changes
Oct 21, 2025
Member
Ivorforce
left a comment
There was a problem hiding this comment.
Makes sense to me.
This code seems a little overcomplicated for me, but that's not really your fault. It might just be due for a structural refactor some time. But for now, your fixes are needed, so LGTM.
e9f3112 to
ddb87f5
Compare
ddb87f5 to
1ad3b99
Compare
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you open
Label25k.tscnin the test project below, and then attempt to delete one of the elements by selecting it in the scene tree dock and then pressing delete, it takes ~12 seconds for me without this PR. With this PR, it's less than half a second.Here's the flamegraph showing the problem:

The
SceneTreeEditorchange take the performance from terrible to usable, getting the time down to under a second by itself.The
TreeVector->LocalVectorchange only makes hundreds of ms worth of difference, but that's enough to bring it from usable to pretty good. It's the less important of the two, if it's objectionable.All performance tests were run on builds made with the following command:
scons optimize=speed_trace debug_symbols=yes platform=linuxbsd dev_build=no production=yesThe test project editor-optimization-test-scenes.zip consists of a series of scenes that each have 25,000 of a common type of node.