bsc/trie
rjl493456442 da977e9cdc core, ethdb, tests, trie: implement NewBatchWithSize API for batcher (#24392)
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.
2022-12-16 17:30:34 +08:00
..
committer.go trie: move locking into trieDB insert method (#25030) 2022-10-28 09:03:21 +08:00
database_test.go trie: there's no point in retrieving the metaroot 2019-04-05 13:09:28 +03:00
database.go trie: improve node rlp decoding performance (#25357) 2022-11-18 11:16:03 +08:00
dummy_trie.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
encoding_test.go trie: use stacktrie for Derivesha operation (#21407) 2020-09-29 17:38:13 +02:00
encoding.go trie: use stacktrie for Derivesha operation (#21407) 2020-09-29 17:38:13 +02:00
errors.go trie: more node iterator improvements (#14615) 2017-06-20 18:26:09 +02:00
hasher.go rlp trie: faster trie node encoding (#24126) 2022-08-26 14:46:13 +08:00
iterator_test.go core, ethdb, tests, trie: implement NewBatchWithSize API for batcher (#24392) 2022-12-16 17:30:34 +08:00
iterator.go rlp trie: faster trie node encoding (#24126) 2022-08-26 14:46:13 +08:00
node_enc.go rlp trie: faster trie node encoding (#24126) 2022-08-26 14:46:13 +08:00
node_test.go trie: improve node rlp decoding performance (#25357) 2022-11-18 11:16:03 +08:00
node.go trie: improve node rlp decoding performance (#25357) 2022-11-18 11:16:03 +08:00
proof_test.go trie: test for edgecase in VerifyRangeProof (#24257) 2022-01-21 14:35:30 +01:00
proof.go rlp trie: faster trie node encoding (#24126) 2022-08-26 14:46:13 +08:00
secure_trie_test.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
secure_trie.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
stacktrie_test.go trie: more tests for stacktrie (#23936) 2021-11-22 08:49:18 +01:00
stacktrie.go rlp trie: faster trie node encoding (#24126) 2022-08-26 14:46:13 +08:00
sync_test.go core, eth, les, trie: remove the sync bloom, used by fast sync 2021-12-03 12:32:41 +02:00
sync.go eth, trie: sync with upstream v1.10.26 to solve snap sync issues (#1226) 2022-12-13 17:16:14 +08:00
trie_test.go core, ethdb, tests, trie: implement NewBatchWithSize API for batcher (#24392) 2022-12-16 17:30:34 +08:00
trie.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00