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

Optimize data clamping in spatial view #6870

Merged
merged 9 commits into from
Jul 14, 2024
Merged

Optimize data clamping in spatial view #6870

merged 9 commits into from
Jul 14, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Jul 12, 2024

What

We do a lot of "clamped joins", where the last element of a component is repeated to match the number of instances.
The code for this was neither ergonomic, nor performant. Now it should be better at both.

In particular, complex iterators like .chain(…).take(…) are often slow and difficult for the optimizer to see through.

Read the commit messages!

This shaves off another 0.5-1 ms off of OPF, out of ~4ms for the inner Points3D visualizer.

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!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@emilk emilk added 📺 re_viewer affects re_viewer itself 🚀 performance Optimization, memory use, etc include in changelog labels Jul 12, 2024
@emilk emilk requested a review from Wumpf July 12, 2024 09:12
@emilk emilk mentioned this pull request Jul 12, 2024
6 tasks
@emilk emilk removed the request for review from Wumpf July 12, 2024 10:20
@emilk emilk merged commit 24b6867 into main Jul 14, 2024
33 of 34 checks passed
@emilk emilk deleted the emilk/clamped branch July 14, 2024 12:35
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.

2 participants