Skip to content
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

Use BufWriter for state dump #2122

Closed
wants to merge 1 commit into from
Closed

Use BufWriter for state dump #2122

wants to merge 1 commit into from

Conversation

mikhailOK
Copy link
Contributor

@mikhailOK mikhailOK commented Feb 12, 2020

On my machine this speeds up binary dump from 13.53s to 1.17s, json dump from 117s to 4.5s

By default there is no buffering.
Copy link
Collaborator

@bowenwang1996 bowenwang1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this to staging as it is not needed immediately.

@mikhailOK
Copy link
Contributor Author

could be one of the reasons why 1 hour testnet state dump was observed

@codecov
Copy link

codecov bot commented Feb 12, 2020

Codecov Report

Merging #2122 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2122      +/-   ##
==========================================
- Coverage   86.65%   86.62%   -0.04%     
==========================================
  Files         166      166              
  Lines       31738    31661      -77     
==========================================
- Hits        27503    27426      -77     
  Misses       4235     4235              
Impacted Files Coverage Δ
chain/client/tests/cross_shard_tx.rs 17.12% <0.00%> (-1.25%) ⬇️
chain/client/tests/catching_up.rs 10.58% <0.00%> (-1.04%) ⬇️
...enesis-tools/genesis-csv-to-json/src/csv_parser.rs 68.34% <0.00%> (-0.43%) ⬇️
chain/client/tests/query_client.rs 93.33% <0.00%> (-0.42%) ⬇️
near/tests/sync_state_nodes.rs 55.14% <0.00%> (-0.42%) ⬇️
runtime/runtime/src/balance_checker.rs 96.70% <0.00%> (-0.37%) ⬇️
chain/client/src/client_actor.rs 84.72% <0.00%> (-0.28%) ⬇️
chain/chain/src/test_utils.rs 79.70% <0.00%> (-0.19%) ⬇️
chain/client/tests/process_blocks.rs 79.33% <0.00%> (-0.17%) ⬇️
chain/client/tests/chunks_management.rs 96.66% <0.00%> (-0.13%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1697741...caa3bd3. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants