-
Notifications
You must be signed in to change notification settings - Fork 783
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
Write state using compact JSON representation #1647
Conversation
This PR allows to write JSON using compact (non-indented) representation if the `TF_USE_COMPACT_STATE_FORMAT` environment variable is defined. This significantly improves performance when working with huge states. For example (on ~450k objects in state): * state size is decreased from 510.1MB to 386.6MB * Time to write to S3 decreased from 112 seconds to 94 seconds * Time to read from S3 decreased from 87 seconds -> 55 seconds Signed-off-by: Alex Ott <alexott@gmail.com>
Reminder for the PR assignee: If this is a user-visible change, please update the changelog as part of the PR. |
Signed-off-by: Alex Ott <alexott@gmail.com>
@alexott looks like some test failures to fix before this can be merged |
Tests are fixed |
I had a small heart attack when looking at the LoC totals in the diff, before remembering that it was the whole goal of this PR 😆 |
oh, yes - missed this one Co-authored-by: Oleksandr Levchenkov <ollevche@gmail.com> Signed-off-by: Alex Ott <alexott@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Signed-off-by: Alex Ott <alexott@gmail.com> Co-authored-by: Oleksandr Levchenkov <ollevche@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
@cam72cam Some of the testdata in |
@eduzgun, sure create an issue. I can't reproduce that myself, the tests are passing on main. |
This PR changes the writing of the state using compact JSON (non-indented) representation. This significantly improves performance when working with huge states.
For example (on ~450k objects in the state):
Resolves #1593
Target Release
1.8.0
Checklist
Go checklist
<-- If your PR contains Go code, please make sure you check off all items on this list: -->
Website/documentation checklist