Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

The HAMT exporter loads the whole shard in order to find a leaf #9

Closed
@achingbrain

Description

@achingbrain

If the dir-hamt-sharded exporter finds a link that points to a subshard, it loads that subshard even if it won't contain the path we're trying to load.

The hashes generated by the hamt algorithm are stable, however, so you don't need to load the entire tree in order to find out where a given node will be, instead you can go level by level in the hamt, recreating it as you go. We use this approach in js-ipfs-mfs to add/remove DAGLinks without loading the entire graph.

This module should use a similar approach, otherwise we don't see any benefit from sharding.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions