nimbus-eth1/nimbus/db/core_db
Jacek Sieka f3a56002ca
Turn payload into value type (#2483)
The Vertex type unifies branches, extensions and leaves into a single
memory area where the larges member is the branch (128 bytes + overhead) -
the payloads we have are all smaller than 128 thus wrapping them in an
extra layer of `ref` is wasteful from a memory usage perspective.

Further, the ref:s must be visited during the M&S phase of garbage
collection - since we keep millions of these, many of them
short-lived, this takes up significant CPU time.

```
Function	CPU Time: Total	CPU Time: Self	Module	Function (Full)	Source File	Start Address
system::markStackAndRegisters	10.0%	4.922s	nimbus	system::markStackAndRegisters(var<system::GcHeap>).constprop.0	gc.nim	0x701230`
```
2024-07-14 12:02:05 +02:00
..
backend Turn payload into value type (#2483) 2024-07-14 12:02:05 +02:00
base odds and ends (#2481) 2024-07-13 20:42:49 +02:00
README.md Core db reorg (#2444) 2024-07-03 15:50:27 +00:00
TODO.md Core db reorg (#2444) 2024-07-03 15:50:27 +00:00
base.nim odds and ends (#2481) 2024-07-13 20:42:49 +02:00
base_iterators.nim Separate config for core db and ledger (#2479) 2024-07-12 13:12:25 +00:00
base_iterators_persistent.nim Separate config for core db and ledger (#2479) 2024-07-12 13:12:25 +00:00
core_apps.nim Separate config for core db and ledger (#2479) 2024-07-12 13:12:25 +00:00
memory_only.nim Separate config for core db and ledger (#2479) 2024-07-12 13:12:25 +00:00
persistent.nim Coeredb related clean up and maint fixes (#2360) 2024-06-14 11:19:48 +00:00

README.md

Core database

Layout of CoreDb descriptor objects

Objects dependence:

    CoreDbRef                           -- Base descriptor
     | | |
     | | +--- CoreDbCtxRef              -- Context descriptor
     | |       | | | |
     | |       | | | +--- CoreDbKvtRef  -- Key-value table
     | |       | | |
     | |       | | +----- CoreDbMptRef  -- Generic MPT
     | |       | |
     | |       | +------- CoreDbAccRef  -- Accounts database
     | |       |
	 | |       +--------- CoreDbTxRef   -- Transaction handle
     | |
     | +----- CoreDbCtxRef
     |         : : : :
     |
     +------- CoreDbCtxRef
               : : : :