da977e9cdc
This PR adds an addtional API called `NewBatchWithSize` for db batcher. It turns out that leveldb batch memory allocation is super inefficient. The main reason is the allocation step of leveldb Batch is too small when the batch size is large. It can take a few second to build a leveldb batch with 100MB size. Luckily, leveldb also offers another API called MakeBatch which can pre-allocate the memory area. So if the approximate size of batch is known in advance, this API can be used in this case. It's needed in new state scheme PR which needs to commit a batch of trie nodes in a single batch. Implement the feature in a seperate PR. |
||
---|---|---|
.. | ||
evm-benchmarks@849b3e239a | ||
fuzzers | ||
solidity | ||
testdata@092a8834dc | ||
truffle | ||
block_test_util.go | ||
block_test.go | ||
difficulty_test_util.go | ||
difficulty_test.go | ||
gen_btheader.go | ||
gen_difficultytest.go | ||
gen_stenv.go | ||
gen_sttransaction.go | ||
init_test.go | ||
init.go | ||
rlp_test_util.go | ||
rlp_test.go | ||
state_test_util.go | ||
state_test.go | ||
transaction_test_util.go | ||
transaction_test.go |