bsc/core/rawdb
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
..
testdata core/rawdb: avoid unnecessary receipt processing for log filtering (#23147) 2021-09-28 12:54:49 +02:00
accessors_chain_test.go fix bug #1034, offline tool start failed when start with pruneancient 2022-08-16 14:02:45 +08:00
accessors_chain.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
accessors_indexes_test.go core/rawdb: single point of maintenance for writing and deleting tx lookup indexes (#21480) 2020-09-15 10:37:01 +02:00
accessors_indexes.go core/rawdb: fix logs to print block number, not address (#23328) 2021-08-04 11:10:37 +03:00
accessors_metadata.go [R4R]fix: tools broken because of writting metadata when open a readyonly db (#1013) 2022-07-25 09:56:17 +08:00
accessors_snapshot.go eth: request id dispatcher and direct req/reply APIs (#23576) 2021-11-26 13:26:03 +02:00
accessors_state.go core/rawdb: add HasCode, HashTrieNode and use them where possible (#24454) 2022-08-22 14:43:14 +08:00
chain_iterator_test.go core/rawdb: fix transaction indexing/unindexing hashing error (#22457) 2021-03-16 12:15:14 +02:00
chain_iterator.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
database_test.go eth/protocols/snap: generate storage trie from full dirty snap data (#22668) 2021-04-27 17:19:59 +03:00
database.go fix bug #1034, offline tool start failed when start with pruneancient 2022-08-16 14:02:45 +08:00
freezer_batch.go [R4R]db: freezer batch compatible offline prunblock command (#1005) 2022-07-22 16:11:34 +08:00
freezer_table_test.go [R4R]db: freezer batch compatible offline prunblock command (#1005) 2022-07-22 16:11:34 +08:00
freezer_table.go core/rawdb: enforce readonly in freezer instantiation (#24119) 2022-01-18 11:29:38 +02:00
freezer_test.go [R4R]db: freezer batch compatible offline prunblock command (#1005) 2022-07-22 16:11:34 +08:00
freezer.go [R4R]db: freezer batch compatible offline prunblock command (#1005) 2022-07-22 16:11:34 +08:00
prunedfreezer.go [R4R]db: freezer batch compatible offline prunblock command (#1005) 2022-07-22 16:11:34 +08:00
schema.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
table_test.go all: simplify and fix database iteration with prefix/start (#20808) 2020-04-15 14:08:53 +03:00
table.go core, ethdb, tests, trie: implement NewBatchWithSize API for batcher (#24392) 2022-12-16 17:30:34 +08:00