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

Speedup 06: 30x speedup for _group_detect - handling detections #528

Merged

Conversation

flixha
Copy link
Collaborator

@flixha flixha commented Dec 12, 2022

What does this PR do?

  • matched_filter._group_detect: 30x speedup in handling detections
    • selecting detections by template name in big list can be slow via loop. Dict-lookup offers ~50x speedup
    • adding prepick to many picks (e.g., 400k) is somewhat slow because of UTCDateTime overhead. ~4x speedup with adding to pick.time.ns directly.

Why was it initiated? Any relevant Issues?

Collecting / handling detections after a matched_filter run was getting slow for many detections and templates.

This PR contributes to the summary issue in #522

PR Checklist

  • develop base branch selected?
  • This PR is not directly related to an existing issue (which has no PR yet).
  • All tests still pass.
    - [ ] Any new features or fixed regressions are be covered via new tests.
    - [ ] Any new or changed features have are fully documented.
  • Significant changes have been added to CHANGES.md.
    - [ ] First time contributors have added your name to CONTRIBUTORS.md.

Copy link
Member

@calum-chamberlain calum-chamberlain left a comment

Choose a reason for hiding this comment

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

Looks good to me. Will merge when lights go green.

@calum-chamberlain calum-chamberlain merged commit 0545f5e into eqcorrscan:develop Jan 1, 2023
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