Skip to content

Conversation

@alonre24
Copy link
Collaborator

@alonre24 alonre24 commented May 1, 2023

Describe the changes in the pull request

id_to_label_mapping in brute force index is a std::vector, and whenever we resize it, its capacity is determined according to this container's policy. Then, when we add a block and call for resize, the capacity is doubled (rather than increased by block size). The fix is calling shring_to_fit() which deallocates unnecessary memory from the container (so its capacity matches its size).

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.06 ⚠️

Comparison is base (9f38780) 96.99% compared to head (b6e9095) 96.93%.

❗ Current head b6e9095 differs from pull request most recent head 5e0b738. Consider uploading reports for the commit 5e0b738 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
- Coverage   96.99%   96.93%   -0.06%     
==========================================
  Files          63       63              
  Lines        3559     3561       +2     
==========================================
  Hits         3452     3452              
- Misses        107      109       +2     
Impacted Files Coverage Δ
src/VecSim/algorithms/brute_force/brute_force.h 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants