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

fix: Avoid re-calculating md5sum on clone and conversion to KmerMinHashBTree #3385

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

luizirber
Copy link
Member

While debugging sourmash-bio/sourmash_plugin_branchwater#503 the flamegraph showed ~26% of the time was spent on calculating MD5.

WHY????

Turns out cloning and converting to KmerMinHash to KmerMinHashBTree triggered recalculation of the MD5 sum, even if it was already present (or... not needed). Oops!

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.46%. Comparing base (e86c8a8) to head (d488294).
Report is 1 commits behind head on latest.

Files with missing lines Patch % Lines
src/core/src/sketch/minhash.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3385      +/-   ##
==========================================
- Coverage   86.47%   86.46%   -0.01%     
==========================================
  Files         137      137              
  Lines       16089    16092       +3     
  Branches     2219     2219              
==========================================
+ Hits        13913    13914       +1     
- Misses       1869     1871       +2     
  Partials      307      307              
Flag Coverage Δ
hypothesis-py 25.43% <ø> (ø)
python 92.40% <ø> (ø)
rust 62.23% <75.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ctb ctb left a comment

Choose a reason for hiding this comment

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

nice!

@luizirber luizirber merged commit e75f306 into latest Nov 11, 2024
42 of 44 checks passed
@luizirber luizirber deleted the lirber/md5sum_on_clone branch November 11, 2024 16:23
@ctb ctb mentioned this pull request Nov 11, 2024
ctb added a commit that referenced this pull request Nov 11, 2024
## [0.17.1] - 2024-11-11

Changes/additions:
* fix: Avoid re-calculating md5sum on clone and conversion to
KmerMinHashBTree (#3385)
* build: simplify Rust release (#3392)
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