Add queue_free_children and free_children#117136
Open
shoyguer wants to merge 3 commits intogodotengine:masterfrom
Open
Add queue_free_children and free_children#117136shoyguer wants to merge 3 commits intogodotengine:masterfrom
queue_free_children and free_children#117136shoyguer wants to merge 3 commits intogodotengine:masterfrom
Conversation
queue_free_children and free_children
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: radiantgurl <69520693+RadiantUwU@users.noreply.github.com>
Author
|
@AThousandShips , done |
dujanhung
approved these changes
Mar 7, 2026
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.
Closes godotengine/godot-proposals#764.
Related to #94163.
Co-authored-by: @radiantgurl
I added:
free_children()to Node classqueue_free_children()to Node classOptimization test
Testing of speed using 1000 children iterating for 500 times.
As you can see, the
free_children()on the "not in tree" gain is slower, and it is because the standalone path skips most SceneTree overhead already, runtime then leans on per-child memdelete cost, and relative gain ends lower than in-tree path.PC build for testing:
Windows 11
AMD Ryzen 5 5600
AMD RX 6750XT 12GB
48GB RAM 3200MHz
SSD M.2 512GB