varfish-org / hgvs-rs

A port of biocommons/hgvs to the Rust programming language
Apache License 2.0
11 stars 4 forks source link

perf: cache mappers, avoid allocations, codons are arrays #172

Closed tedil closed 3 months ago

tedil commented 3 months ago

I didn't realize we already depend on quick_cache, so perhaps replace the new cached dep with that.

The key for caching currently relies on the provider supplying consistent data_version and schema_version information.

Todo: Should depend on next seqrepo release.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 87.71930% with 14 lines in your changes missing coverage. Please review.

Project coverage is 86.34%. Comparing base (bd2b05e) to head (aae3cbb). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #172 +/- ## ========================================== - Coverage 87.42% 86.34% -1.09% ========================================== Files 18 18 Lines 7705 7145 -560 ========================================== - Hits 6736 6169 -567 - Misses 969 976 +7 ``` | [Files](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org) | Coverage Δ | | |---|---|---| | [src/data/cdot/json.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fdata%2Fcdot%2Fjson.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL2RhdGEvY2RvdC9qc29uLnJz) | `89.59% <100.00%> (ø)` | | | [src/mapper/altseq.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fmapper%2Faltseq.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL21hcHBlci9hbHRzZXEucnM=) | `93.58% <100.00%> (+0.04%)` | :arrow_up: | | [src/mapper/cigar.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fmapper%2Fcigar.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL21hcHBlci9jaWdhci5ycw==) | `96.69% <ø> (ø)` | | | [src/mapper/variant.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fmapper%2Fvariant.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL21hcHBlci92YXJpYW50LnJz) | `91.48% <100.00%> (+0.53%)` | :arrow_up: | | [src/normalizer.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fnormalizer.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL25vcm1hbGl6ZXIucnM=) | `70.73% <ø> (ø)` | | | [src/sequences.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fsequences.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL3NlcXVlbmNlcy5ycw==) | `94.86% <75.00%> (-3.43%)` | :arrow_down: | | [src/mapper/alignment.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fmapper%2Falignment.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL21hcHBlci9hbGlnbm1lbnQucnM=) | `90.32% <75.00%> (-0.24%)` | :arrow_down: | | [src/data/uta.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/172?src=pr&el=tree&filepath=src%2Fdata%2Futa.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL2RhdGEvdXRhLnJz) | `89.48% <85.71%> (-2.53%)` | :arrow_down: |