ref: Improve view hierarchy performance#373
Merged
Conversation
jpnurmi
reviewed
Sep 19, 2025
Collaborator
jpnurmi
left a comment
There was a problem hiding this comment.
Impressive improvement :)
178b437 to
8726999
Compare
Update view_hierarchy_processor.cpp
8726999 to
5a4cdb7
Compare
jpnurmi
approved these changes
Sep 19, 2025
Collaborator
Author
|
Thanks for the suggestions, @jpnurmi |
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.
This PR improves performance of scene tree data capture (more commonly known as view hierarchy in Sentry).
This mostly improves JSON construction by reducing redundant memory allocations using large specialized memory buffer and "in-place" utf8 conversion. It benefits both small and large scene trees. With large trees I've recorded 4 to 5 times improvement in generation speed. Overall speed improvement taking file IO into account is around 3x for optimistic scene tree size of 4000 nodes.
I also noticed a small improvement in file IO, likely due to avoiding extra copy.
Synthetic tests
For the tests, I've added 3905 nodes 5 levels deep, each with 5 children.