-
Notifications
You must be signed in to change notification settings - Fork 589
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
app/apptesting: Reduce memory allocations in KeeperTestHelper.Setup()
#3568
Conversation
Thanks for picking this up! Apologies though, having a hard time understanding the benchmark pasted. Is that the output for a particular function? We can see overall impact by doing You'd get something like:
And we should see both time & allocs/op go down |
oh, it is from |
361e3ce
to
55f243f
Compare
This LGTM, nice! Other followups involve work in other repos, so I recommend marking this ready for review, and we get this merged? |
Co-authored-by: Ruslan Akhtariev <[email protected]> (cherry picked from commit 4751054)
Co-authored-by: Ruslan Akhtariev <[email protected]> (cherry picked from commit 4751054) Co-authored-by: Ruslan Akhtariev <[email protected]>
Component of: #2148
What is the purpose of the change
Memprofile
KeeperTestHelper.Setup()
and reduce memory allocsUsing Benchmark added in #2143
Steps Taken
app/encoding.go
encoding/json.Unmarshal()
takes too much resources and time to do its job. There are alternatives to json'sUnmarshal()
, one of which is jsoniter, which claims to be faster thanencoding/json
packageStarting up of archive nodes (improving performance of
iavl.Load.Version()
) is tackled in this PR: feat: makeLazyLoadVersion
validateInitialVersion
the same asLoadVersion
cosmos/iavl#638Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no