-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
rerun::Collection
almost everywhere we'd use std::vector
befo…
…re (#4247) * Part of the series of #3794 ### What ... and various improvements to `rerun::Collection` in general to be up for the task. Added copy assignment/construction, added vector conversion, removed serialization method (handled at callsites now) Also, I overhauled and generalized our builtin `rerun::CollectionAdapters` further. They give now more exact guarantees on when they copy & move data. To support the considerably increased significance and abilitites of this data structure I added a lot more tests, in particular checking on the aforementioned move/copy guarantees. Huge thanks to @AnkeAnke for pointing out to me how we can support std compatible contains generically in a trivial way (`rerun::type_traits::value_type_t`!). This made it possible that this PR requires almost no changes in user/test/example code since most types just snap in the same as before. As expected this change improves the performance on the image logging benchmark (which logs 4 16k rgba images). Timing on M1 Max went from ~2.9s to ~2.4s and on the AMD windows box I use from ~3.0s to ~2.5s (did a bunch of runs, values are excluding prepare and process setup, AMD fluctuates a lot) DRAFT until I'm sure this works on more compilers. ### 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/4247) (if applicable) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4247) - [Docs preview](https://rerun.io/preview/825bf7905ccaef0f23d87a4ffe0ae406018edffa/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/825bf7905ccaef0f23d87a4ffe0ae406018edffa/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
113 changed files
with
2,555 additions
and
1,653 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.