Merged
Conversation
Reuse the serialization buffers used for constructing the LevelDB write batch. This avoids 2 allocations per utxo write.
Contributor
|
ACK. (I tested this on the above mentioned other branch.) |
Member
|
Seems straightforward - code review ACK ed58969 |
laanwj
approved these changes
Dec 14, 2016
| ssValue.reserve(DBWRAPPER_PREALLOC_VALUE_SIZE); | ||
| ssValue << value; | ||
| ssValue.Xor(dbwrapper_private::GetObfuscateKey(parent)); | ||
| leveldb::Slice slValue(&ssValue[0], ssValue.size()); |
Member
There was a problem hiding this comment.
CDataStream should really get a .data(). Not necessarily here though :)
Member
Author
There was a problem hiding this comment.
Agree, but let's do that separately (#9353?).
Contributor
|
ACK ed58969 |
sipa
added a commit
that referenced
this pull request
Dec 16, 2016
ed58969 Batch construct batches (Pieter Wuille)
codablock
pushed a commit
to codablock/dash
that referenced
this pull request
Oct 23, 2017
ed58969 Batch construct batches (Pieter Wuille)
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.
Reuse the serialization buffers used for constructing the LevelDB write batch. This avoids 2 allocations per utxo write.
I have not benchmarked this exact change, but in another branch I'm working on it results in a 12% speedup for the flush.