-
Notifications
You must be signed in to change notification settings - Fork 720
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
More memory efficient query ledger-state command #4205
More memory efficient query ledger-state command #4205
Conversation
6e165a9
to
ab5b17a
Compare
ab5b17a
to
f37fc75
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.
Nice work 👍 . You have introduce alignment where there wasn't any in the JSON instances. Lets stick to non-alignment. I think we should adopt an approach similar to ledger where we run a script with ormolu so there is no more ambiguity of the formatting.
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.
We should really try avoiding duplication. If at any point we need to refactor this code we'll have to do double amount of work. And even worse we have more room for mistakes, say if one of the duplicate implementations will get out of sync (eg. change one field name and then forget the other)
691fb3b
to
81ea950
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 great, thank you! Very minor syntactic adjustments suggested
74e2d46
to
ccbd58a
Compare
ccbd58a
to
cbb8ea9
Compare
4a35a0d
to
e411a98
Compare
e411a98
to
ff92c63
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.
Good work! Please squash the commits.
ff92c63
to
a79275b
Compare
Squashed |
bors r+ |
Build succeeded: |
This implements
toEncoding
of variousToJSON
instances because it allows for more memory efficient lazy encoding.As part of the change, the output of the query command will no longer be pretty printed.
Before uses about 16.4G:
After uses about 11.5G: