This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Use BufReader and BufWriter#684
Merged
gavofyork merged 2 commits intoparitytech:masterfrom Sep 7, 2018
Merged
Conversation
1b05442 to
03f8365
Compare
dvdplm
reviewed
Sep 7, 2018
|
|
||
| let file = fs::File::create(path)?; | ||
| serialize(file, &self.store) | ||
| serialize(BufWriter::with_capacity(1024 * 1024, file), &self.store) |
Contributor
There was a problem hiding this comment.
Curious, how did you get to 1Mb being a good value here?
Contributor
Author
There was a problem hiding this comment.
Considering that the file is 45MB right now, the default of 8kB looked a bit too low to me.
Contributor
There was a problem hiding this comment.
So why 1? Why not 2? Or 5 or 45?
Contributor
Author
There was a problem hiding this comment.
Well, an arbitrary value had to be set.
Ideally we would benchmark multiple values, but this doesn't seem very productive to me at this stage.
Contributor
|
Build is stumbling on the |
Contributor
|
Should be fixed by rebasing to the tip of the master |
03f8365 to
e602f2c
Compare
dvdplm
added a commit
that referenced
this pull request
Sep 8, 2018
…rs-generic-over-hasher-and-rlpcodec * origin/master: Fixed sync stalling when import queue is full (#691) New extrinsic dispatch model (#678) remove parachain's Cargo.lock (#682) Implement json metadata for outer events (#672) Improvements to the Kademlia system (#688) Use BufReader and BufWriter (#684) Switch to using parity/rust:substrate which has rust nightly-2018-08-31 (#686) Update to latest libp2p (#673) Implement storage json metadata (#670) impl MaybeEmpty for H256 and u64 (aka AccountId in prod/tests) (#665) Speedup compilation (#671) Remove requirement of function indices for decl_module! (#666) DigestItem trait (v2) (#650)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes all the performances issues, and should also fix most of the weird disconnects.