Skip to content

Time-based samplers are significantly slower than index-based samplers #256

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

Closed
NicolasHug opened this issue Oct 10, 2024 · 0 comments · Fixed by #284
Closed

Time-based samplers are significantly slower than index-based samplers #256

NicolasHug opened this issue Oct 10, 2024 · 0 comments · Fixed by #284

Comments

@NicolasHug
Copy link
Member

Running our sampler benchmark:

----------
num_clips = 1
clips_at_random_indices     med = 40.67ms +- 25.31
clips_at_regular_indices    med = 25.99ms +- 16.88
clips_at_random_timestamps  med = 39.64ms +- 22.33
clips_at_regular_timestamps med = 34.39ms +- 5.21
----------
num_clips = 50
clips_at_random_indices     med = 307.58ms +- 493.30
clips_at_regular_indices    med = 382.15ms +- 202.65
clips_at_random_timestamps  med = 4425.34ms +- 1046.69
clips_at_regular_timestamps med = 3096.98ms +- 910.78

This is likely due to the fact that our frame deduplication logic isn't really effective when we dedup timestamps. It's likely that we are decoding the same frame multiple time, and we didn't de-dup that frame because it was requested at slightly different ptss.

We should convert the pts to indices first for the dedup logic to be more efficient. This is something we can do once we implement all this in C++.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant