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
Improve entity size stats: include whole subtree #4542
Conversation
@@ -88,22 +88,47 @@ pub struct SubtreeInfo { | |||
/// | |||
/// ⚠ Auto-generated instance keys are _not_ accounted for. ⚠ | |||
pub time_histogram: TimeHistogramPerTimeline, | |||
|
|||
/// Number of bytes used by all arrow data in this tree (ignores overhead from book-keeping, schemas, etc). |
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.
The size of the cell does take into account the copy of the arrow schema that is stored in the cell
match event.kind { | ||
StoreDiffKind::Addition => { | ||
self.time_histogram | ||
.add(&event.times, event.num_components() as _); | ||
|
||
for cell in event.cells.values() { | ||
self.data_bytes += cell.heap_size_bytes(); |
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.
The cells themselves are also stored on the heap at this point, so you want total_size_bytes()
They are still not exactlty _small_, but a lot _smaller_, and since they all stream, it should be pretty fine anyways ``` detect_and_track_objects.rrd (55.3 MiB) nuscenes.rrd (90.0 MiB) objectron.rrd (81.1 MiB) open_photogrammetry_format.rrd (67.6 MiB) raw_mesh.rrd (116 kiB) rgbd.rrd (36.8 MiB) segment_anything_model.rrd (8.5 MiB) ``` This helped in figuring out what to focus on: * #4542 ### 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 the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/4545/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4545/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/4545/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [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/4545) - [Docs preview](https://rerun.io/preview/4aa4c24e403c16b455d8be8b02b98d5c8164fa53/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/4aa4c24e403c16b455d8be8b02b98d5c8164fa53/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
What
Previously when hovering an entity, only the memory used by its own components was shown.
Now the entire subtree is included, which makes much more sense as an answer to the analagous question "how much space is this folder taking up?"
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io