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

Optimized cpu time for 3D point clouds (once again!) #5273

Merged
merged 3 commits into from Feb 24, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Feb 24, 2024

What

Embarrassingly simple optimization that got missed when cachifying the point cloud: Removed two needless to_vec copy calls which were done on separate rayon jobs.

pixi run rerun-release ../rainwater.rrd --threads=1
19.6ms -> 17.7ms cpu time on top bar counter in rainwater scene (4.6mio colored points with homogeneous radius).
Without --threads=1 perf was a bit too unstable to make good statements (also perf trace can't be averaged nicely) and arguably much more interesting anyways. There's not much multithreading going on in this scene regardless.

Starts to get gpu bound on my mac which is ofc extremely view & resolution dependent. Haven tried but I expect the gpu->cpu transfer cost to still be much more significant on machines without unified memory architecture (and obviously we want to fix that regardless).

Before:
image

After:
image

As visible from the traces, we could certainly still do better fairly easily by having a fast path on color and radius processing

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
  • If applicable, add a new check to the release checklist!

@Wumpf Wumpf added 📺 re_viewer affects re_viewer itself 📉 performance Optimization, memory use, etc include in changelog labels Feb 24, 2024
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

niiice

@Wumpf Wumpf merged commit 289a812 into main Feb 24, 2024
43 of 44 checks passed
@Wumpf Wumpf deleted the andreas/yet-another-point3d-perf-optimization branch February 24, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 📉 performance Optimization, memory use, etc 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants