use with_capacity to reduce re-allocations fixes #3896#3961
Merged
jasonwilliams merged 5 commits intoboa-dev:mainfrom Nov 2, 2024
Merged
use with_capacity to reduce re-allocations fixes #3896#3961jasonwilliams merged 5 commits intoboa-dev:mainfrom
jasonwilliams merged 5 commits intoboa-dev:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3961 +/- ##
==========================================
+ Coverage 47.24% 52.88% +5.64%
==========================================
Files 476 483 +7
Lines 46892 46855 -37
==========================================
+ Hits 22154 24780 +2626
+ Misses 24738 22075 -2663 ☔ View full report in Codecov by Sentry. |
nekevss
reviewed
Aug 20, 2024
raskad
approved these changes
Sep 10, 2024
Member
raskad
left a comment
There was a problem hiding this comment.
I'd be for merging this. I ran the benchmarks locally and there are no significant changes overall.
HalidOdat
approved these changes
Sep 11, 2024
Member
HalidOdat
left a comment
There was a problem hiding this comment.
Besides the comment, this looks good to me! :)
a70f9ae to
1882c65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR attempts to address #3896
We already raised the threshold, but it would be good to not re-allocate the hashmaps and vectors as we will up the property storage during startup.
It doesn't seem to have much noticeable affect in the performance profiler but DHAT shows less
grow_onecalls fromboa_engine::object::shape::property_table::PropertyTableInner::insert (object/shape/property_table.rs:70:9), there are still some, we may be able to find these by checking.len() == .capacity()and tracing back where these are coming from