-
Notifications
You must be signed in to change notification settings - Fork 4.6k
remove par_iter on update index below threshold #25699
Conversation
}) | ||
.flatten() | ||
.collect::<Vec<_>>() | ||
let threshold = 1; |
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.
make it const? hoping that the compiler can const propagating and inline lambda for the special case of 1.
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.
lgtm
data on my mnb run for all # accounts > 1% of the total:
|
Note that any individual pubkey update index call could be a page fault currently. With a threshold of 1, we are clearly better not adding parallelism. It gets more complicated to know with len > 1. |
To get to a cumulative ~1% of calls, we have to include all calls with len > 64.
|
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.
Looks good to me as well.
Pull request has been modified.
doh. my metrics were from testnet... |
Codecov Report
@@ Coverage Diff @@
## master #25699 +/- ##
===========================================
+ Coverage 75.4% 82.1% +6.6%
===========================================
Files 40 621 +581
Lines 2345 170485 +168140
Branches 338 0 -338
===========================================
+ Hits 1769 139978 +138209
- Misses 459 30507 +30048
+ Partials 117 0 -117 |
(cherry picked from commit 149a54b)
(cherry picked from commit 149a54b) Co-authored-by: Jeff Washington (jwash) <[email protected]>
Problem
Improve perf for common call with low # accounts to update.
See #24692
The largest call I saw on a mnb snapshot and brief ledger replay was 302 accounts being updated at a time.
Summary of Changes
Fixes #