-
Notifications
You must be signed in to change notification settings - Fork 324
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
[db] ResetSnapshots() performance improvement #4153
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4153 +/- ##
==========================================
+ Coverage 75.38% 76.40% +1.02%
==========================================
Files 303 339 +36
Lines 25923 28890 +2967
==========================================
+ Hits 19541 22073 +2532
- Misses 5360 5716 +356
- Partials 1022 1101 +79 ☔ View full report in Codecov by Sentry. |
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.
any benchmark test?
benchmark added |
db/batch/kv_cache.go
Outdated
|
||
func (kv *kvCacheValue) reset() { | ||
([]int)(*kv)[0] = 0 | ||
*kv = (*kv)[0: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.
[:1]
Quality Gate passedIssues Measures |
Description
Reduced the computation of map keyhash, reduced
keyCacheValue
memory allocation, Mintblock time dropped by half, this PR has been tested on nightlyFixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: