-
Notifications
You must be signed in to change notification settings - Fork 156
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
Reduce memory usage with sharing #4826
Conversation
c9f79f2
to
3b566f3
Compare
79ce614
to
140b7ac
Compare
140b7ac
to
942d1bc
Compare
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.
I'm a little confused by the choice of implementing decSharePlusCBOR
vs decShareCBOR
, but that's probably more because my unfamiliarity with this DecShareCBOR
typeclass.
What I gather is something like this:
- If you define
getShare
anddecShareCBOR
for a type, then if from "above" someone is callingdecSharePlusCBOR
for this type, then thegetShare
gets added to the shared state. - If you define
decSharePlusCBOR
instead, then it's up to you what you add to the shared state - but if you don't explicitlyput
anything, is there actually anything added to it?
Maybe we could discuss about this when we talk, no need to waste time writing!
942d1bc
to
2ad0bf9
Compare
Description
Fixes #3486
It will probably be easier to review it by commit rather than PR as a whole. Especially for changes to the GOV rule
Memory benchmark
Here is run of a memory benchmark from the
ledger-state
package of loading a snapshot frompreprod
networkBefore this PR:
With deserialization sharing implemented in this PR:
This benchamrk serves as confirmation that sharing works as expected during deserialization. Once we have integration ready for
cardano-node-10.3
we'll be able to test sharing during chain replay as well.Checklist
CHANGELOG.md
files updated for packages with externally visible changesNew section is never added with the code changes. (See RELEASING.md)
.cabal
andCHANGELOG.md
files when necessary, according to theversioning process.
.cabal
files updated when necessaryIf you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
scripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
updated (usescripts/gen-hie.sh
)