Paprika icon indicating copy to clipboard operation
Paprika copied to clipboard

RootPage of bigger size

Open Scooletz opened this issue 9 months ago • 1 comments

Currently, the RootPage component is the same size as other pages. We could revisit this approach and make it much bigger (8kb, 16kb, 32kb...) and scale up the structures it contains. Potential benefits and applications:

  1. shorter paths in the tree
  2. shorter lookup for contract ids
  3. bigger AbandonedList
  4. adding some SlottedArray at the root

To make it work for experiments, the following steps should be taken:

  • [ ] Preparation
    • [ ] detach RootPage from Page
    • [ ] IPageManager.FlushRootPage and implementations needs to be revisit to take the new size into consideration. Also, as writing multiple pages is not atomic, use the 0th page as the index to what was the last write.
    • [ ] PagedDb._pooledRoots cannot be based on the BufferPool which uses 4k pages or BufferPool should be made configurable
    • [ ] PagedDb and NextFreePage calculations, should start at N + RootPage.Size
  • [ ] Experiments
    • [ ] Use Paprika.Runner to show differences
    • [ ] Use tests to show differences
    • [ ] Use Benchmarks to show differences

Scooletz avatar May 09 '24 09:05 Scooletz

Could you assign it to me, please?

murluki avatar May 09 '24 13:05 murluki