Skip to content
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

New time panel density graph #1557

Merged
merged 45 commits into from
Mar 14, 2023
Merged

New time panel density graph #1557

merged 45 commits into from
Mar 14, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Mar 10, 2023

Closes #619

The time panel used to be O(N) over the number of log messages. With this PR it is now O(log(N)).

In order to accomplish this I decided to replace the "ball scatterer" visualization of the time panel with a brand new density graph. The end result is something that is much faster, and also looks much better.

density-graph

Checklist

@emilk emilk added 📺 re_viewer affects re_viewer itself 📉 performance Optimization, memory use, etc labels Mar 10, 2023
"27.9 B/entry, spacing: 5M",
"35.5 B/entry, spacing: 8M",
"23.0 B/entry, spacing: 13M",
"9.6 B/entry, dense",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I switched to a faster but more memory-intense variant of re_int_histogram

let key = i as i64;
set.increment(key, 1);
#[cfg(test)]
mod tests {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@emilk emilk force-pushed the emilk/refactor-data-density-graph branch from 3ff826e to 19e8db1 Compare March 11, 2023 09:41
@emilk emilk marked this pull request as ready for review March 11, 2023 09:41
@jleibs jleibs self-requested a review March 13, 2023 14:42
Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Couple small comment/cleanup possibilities.

crates/re_int_histogram/src/tree.rs Outdated Show resolved Hide resolved
crates/re_int_histogram/src/tree.rs Outdated Show resolved Hide resolved
crates/re_int_histogram/src/tree.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/ui/time_panel/data_density_graph.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/ui/time_panel/time_axis.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit 1792207 into main Mar 14, 2023
@emilk emilk deleted the emilk/refactor-data-density-graph branch March 14, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📉 performance Optimization, memory use, etc 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The time panel is slow when viewing a lot of data points
2 participants