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 point cloud rendering #2950

Closed
wants to merge 2 commits into from
Closed

Conversation

emilk
Copy link
Member

@emilk emilk commented Aug 9, 2023

What

Makes open_photogrammetry_format example ~30% faster by only calling iter_required_component::<Point3D>() once per frame instead of twice.

Before: 158 ms/frame:
image

After: 119 ms/frame:
image

(debug builds)

This is a bit of a stop-gap until #2523 is fixed

Checklist

@emilk emilk added the 🚀 performance Optimization, memory use, etc label Aug 9, 2023
@Wumpf Wumpf self-requested a review August 9, 2023 13:44
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

a bit worrisome that reading from the store is that slow. Feels a bit more like a workaround for store reads that shouldn't be that slow?

@emilk
Copy link
Member Author

emilk commented Aug 9, 2023

Yeah, it is pretty crazy that it is this slow

@emilk
Copy link
Member Author

emilk commented Aug 9, 2023

I added a reminder in #2523 to revert this when we have optimized the store

@emilk
Copy link
Member Author

emilk commented Aug 9, 2023

Let's hold off merging this until we take a proper stab at #2523 - iterating through a bunch Vec3D in the store should be a almost zero-cost thing. The data should already be laid out exactly like a &[f32; 3]

@emilk emilk added the do-not-merge Do not merge this PR label Aug 9, 2023
@Wumpf
Copy link
Member

Wumpf commented Aug 15, 2023

Let's give it another spin on top of #2970

@emilk
Copy link
Member Author

emilk commented Aug 16, 2023

Will do

@emilk
Copy link
Member Author

emilk commented Aug 16, 2023

Latest main:

Screenshot 2023-08-16 at 12 35 47

This PR with latest main merged in:

image

no difference. Let's close this PR!

@emilk emilk closed this Aug 16, 2023
@emilk emilk deleted the emilk/optimize-point-clouds branch August 16, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge Do not merge this PR 🚀 performance Optimization, memory use, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants