-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance for many entities (#3078)
### What * Fixes #2285 (.. at least fixes it well enough for the moment I reckon) Improves both the per space view rendering and the space view adding heuristic. In particular on the later there's still significant gains to be made. Most importantly we should be scaling now much better with number of added systems. Went fairly early with the decision to have the primary datastructure to pass around be a `Map<System, Vec<Entity>>` (conceptual) instead of the other way round since this is what we need in the systems most of the time. This is another step towards a stronger contract of systems specifying what components they will query ahead of time! The way it is implemented on thr (rename from `BlueprintTree` 💥) `SpaceViewContents` also paves the way for ui selection of systems for a given entity path which complements the ongoing work on our new data ingestion interfaces. ----- Testcase: `examples/python/open_photogrammetry_format/main.py --no-frames`, **fully reset viewer** and then hiding **NOT REMOVING** the points (the world/pcl entity) and deselecting them. (The bold marked pieces are very important as they have an influence on what heuristics run - see #3077) Before: ![image](https://github.com/rerun-io/rerun/assets/1220815/cda9d555-8839-4d78-8507-cf4ed34bad70) After: ![image](https://github.com/rerun-io/rerun/assets/1220815/d34a00f8-05af-4160-85bf-b709a0d36ecb) (release runs, averaged over a bunch of frames on my M1 Max) Highlights: * `AppState::show`: 24.0ms ➡️ 14.6ms * `SpaceViewBlueprint::scene_ui`: 4.9ms ➡️ 2.6ms * this was the original primary optimization target! * `Viewport::on_frame_start`: 15.2ms ➡️ 7.4ms * `default_created_space_view`: 12.7ms ➡️ 5.1ms * quite some time spent on this, but we want to do a paradigm shift there: #3079 (slight number discrepancies from the screenshot are due to doing a different run) ---- Draft todo: Code sanity check. Suspecting some heuristics might be slightly broken, need to go through examples ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3078) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/3078) - [Docs preview](https://rerun.io/preview/fc5bb0b8908e2e8c666a6d5daa1dee105fe2aae8/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/fc5bb0b8908e2e8c666a6d5daa1dee105fe2aae8/examples) <!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/) --------- Co-authored-by: Jeremy Leibs <[email protected]>
- Loading branch information
Showing
53 changed files
with
978 additions
and
541 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
Oops, something went wrong.