8000 Don't serialize or deserialize nodes · Issue #804 · ava-labs/firewood · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Don't serialize or deserialize nodes #804
Open
@rkuris

Description

@rkuris

To read data, we currently read nodes (starting at the root) and for each node we construct a BranchNode object. Then we only read one child address out of that. It would be more efficient to read the node serialized and have a method that figures out from the serialized object what the child address is at a given offset.

One issue with this today is that the node is compacted very tightly. It might make sense to relax this compaction some so that we don't have to pay the cost of serializing. For example, the branch nodes could have the list of children as an array at the end rather than packing empty items together.

It might also be good for the actual data for the node to be in a Cow which could facilitate using memory mapped files for nodes stored on disk and a heap arena for nodes stored in memory.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0