-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
use with_capacity to reduce re-allocations fixes #3896 #3961
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3961 +/- ##
==========================================
+ Coverage 47.24% 51.87% +4.62%
==========================================
Files 476 468 -8
Lines 46892 45307 -1585
==========================================
+ Hits 22154 23501 +1347
+ Misses 24738 21806 -2932 ☔ View full report in Codecov by Sentry. |
- add profiling marks in more places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be for merging this. I ran the benchmarks locally and there are no significant changes overall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the comment, this looks good to me! :)
Co-authored-by: Haled Odat <[email protected]>
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_one
calls 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