Skip to content

Improve performance of adding beats #332

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

Merged
merged 3 commits into from
Apr 11, 2025
Merged

Improve performance of adding beats #332

merged 3 commits into from
Apr 11, 2025

Conversation

FelipeDefensor
Copy link
Collaborator

Caches beat metric position and prevents redudant calls to BeatTimeline.update_metric_fraction_dict to greatly improve performance when adding more beats to timelines with hundreds of beats.

This is not a long-term solution to our performance issues, but it solves #321 for the use-case described. Where more precise beat annotations are required, the performance is still subpar.

This improves by ~10x the speed of adding a beat at the start of a beat timeline with 300 beats.
…ent_data

This value can be used by subclasses to determine if further computing is necessary
@FelipeDefensor FelipeDefensor changed the base branch from main to dev April 5, 2025 00:21
@FelipeDefensor FelipeDefensor requested a review from azfoo April 5, 2025 00:22
@azfoo azfoo merged commit b7950c6 into dev Apr 11, 2025
9 checks passed
@azfoo azfoo deleted the beat-add-perf branch April 11, 2025 20:23
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 this pull request may close these issues.

2 participants