Skip to content

Improve check performance#763

Merged
garrettjstevens merged 8 commits intomainfrom
improve_check_performance
Mar 16, 2026
Merged

Improve check performance#763
garrettjstevens merged 8 commits intomainfrom
improve_check_performance

Conversation

@garrettjstevens
Copy link
Copy Markdown
Contributor

While benchmarking feature imports, I noticed that checks seemed to be taking longer than expected. I did a performance profile and found some things that helped quite a bit. Checking 1000 features goes from about 2m30s to about 35s with these changes. Most of them have to do with allowing the checks to get the sequence for various ranges more efficiently.

  • Cache the sequence adapters
  • Cache the document that tells how to get the sequence for a particular reference sequence id
  • Avoid a structuredClone

I still need figure out an optimization for getting a lot of small sequences. The check that makes sure the splice sites are canonical needs to get a lot of 3bp sequences, and these calls seem to take a lot of time. If I remove that part of the check altogether, it drops the time for checking 1000 features to about 12s.

@garrettjstevens garrettjstevens self-assigned this Mar 10, 2026
@garrettjstevens garrettjstevens merged commit ddc7ddc into main Mar 16, 2026
7 checks passed
@garrettjstevens garrettjstevens deleted the improve_check_performance branch March 16, 2026 20:22
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.

1 participant