-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter entities in the UI (part 7): Refactor and optimize re_time_panel
and add more tests
#8863
Merged
Conversation
This file contains 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
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
ac9dd5b
to
a4c38ef
Compare
Wumpf
approved these changes
Jan 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great!
Base automatically changed from
antoine/shift-click-select-blueprint-tree
to
main
January 30, 2025 15:28
data update update data
…it can be called many times in some benchmarks. Note: there is one code path that may result in this function to be different from essentially a no-op. It goes through `resolve_mono_instance_path`, which does have a scope to it. It's less than 1ms in my worst case benchmark-
a2417ae
to
0c1eb2c
Compare
This was referenced Jan 31, 2025
This was referenced Jan 31, 2025
abey79
added a commit
that referenced
this pull request
Feb 5, 2025
### Related - Closes #8903 - Part of #8586 - Part of a series of PR: - #8645 - #8652 - #8654 - #8672 - #8706 - #8728 - #8795 - #8863 - #8886 - #8933 ### What This PR supports `/` in filter query. Semantics are now as follows: - Queries are made of whitespace separated keyword. - Paths are not matched unless they match all keywords individually at least once. - Keywords may have 1 or more `/` separated "parts". - Single part keyword behave as before: paths are matched if they contain that keyword anywhere at least once. - Single part keyword can now be prefixed and/or postfixed with a slash, eg. "/fir". In that case, the keyword part must be found at the beginning and/or end of at least one path part to match (e.g. "/fir" matches "/my/first/entity" but doesn't match "xxfire/entity"). - Multi-part keyword (e.g. "a/b/c") match paths that contains corresponding, matching sequence of part (e.g. "/xxxxa/b/cxxxxx"). Such keywords can also be prefixed and/or postfixed with a "/", with the same semantics. <img width="293" alt="image" src="https://github.com/user-attachments/assets/efca95df-5021-425b-96d2-036aeb7d1236" />
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
include in changelog
🚜 refactor
Change the code, not the functionality
ui
concerns graphical user interface
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.
Related
CustomContent
more useful #8645re_blueprint_tree
and add more tests #8795re_time_panel
and add more tests #8863/
in queries #8933What
This PR refactors the streams tree code in a similar way as what was done in the blueprint tree in #8795. In addition, it makes it significantly faster.
I've decided against listing all components in the data structure and instead keep that at the (on-demand) UI level. The reason for that is that
store.all_components_for_entity()
can be rather expensive as the number of entities grows.Note: This PR does not introduce shift-click range selection (that will be in a follow up PR). Because of the design decision above, it will be slightly more tricky (but worth it perf-wise).
Visual changes
Only visual/behavioural change introduced in this PR is that leaf entities are now collapsed by default when the entity filter is active (we're searching for entities, not components, so we don't need to see them).
Performance
Like the previous PR, we are now parsing the entire entity tree regardless of whether we're going to use/display it or not. With air traffic data, that's 0.3ms only.
As for the optimisations, it's hard to keep track of everything. But frame time for air traffic data with no view and uncollapsed time panel went from ~44ms (0.21) to ~26ms (this PR).