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

Finer plot aggregation #4998

Merged
merged 7 commits into from
Feb 1, 2024
Merged

Finer plot aggregation #4998

merged 7 commits into from
Feb 1, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Feb 1, 2024

What

We would previously aggregate the plots over a time-window equal in width to a ui point.

The MinMax aggregator does a zig-zag between min and max, so this causes a very jagged look, especially on high-dpi screens.

With this PR, we switch to using a physical pixels as the default aggregation width, but for MinMax is is half a pixel. This reduces the jaggedness, but does not completely remove it. It comes at a cost though of higher tessellation cost.

I have an idea for how we can throw rayon on the tessellation problem though.

Before

Screenshot 2024-02-01 at 14 18 26

After

Screenshot 2024-02-01 at 14 18 00

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@emilk emilk added ui concerns graphical user interface 📉 performance Optimization, memory use, etc labels Feb 1, 2024
Copy link

github-actions bot commented Feb 1, 2024

Size changes

Name main 4998/merge Change
plots.rrd 194.56 kiB 1372.16 kiB +605.26%

@nikolausWest
Copy link
Member

Worth checking the before and after performance on the plot-dashboard benchmark script for this one

Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

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

lgtm as long as the impact on a plot dashboard is negligible

@emilk
Copy link
Member Author

emilk commented Feb 1, 2024

Test-data:

just rs-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 --save big-plot.rrd
tessellation ms
main 2.9 ms
This PR, serial tessellation 4.5 ms
This PR, parallell tessellation 2.3 ms

Parallel tessellation is something I'm working on in a branch on egui.
Of course, it won't help on web.

@emilk emilk added 📺 re_viewer affects re_viewer itself and removed 📉 performance Optimization, memory use, etc labels Feb 1, 2024
@emilk
Copy link
Member Author

emilk commented Feb 1, 2024

Yeah, I think I will roll this back to using full pixel width, thinking especially about retina screens on web.

@emilk emilk added the exclude from changelog PRs with this won't show up in CHANGELOG.md label Feb 1, 2024
@emilk emilk merged commit 54d957d into main Feb 1, 2024
40 checks passed
@emilk emilk deleted the emilk/finer-aggregation branch February 1, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md 📺 re_viewer affects re_viewer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants