doc: add note on HAMT sharding, adjust
@@ -52,10 +52,25 @@ impl<'a> PostOrderIterator<'a> {
use sha2::{Digest, Sha256};
use std::borrow::Cow;
- // TODO: this could quite easily be made so that the links are read from the btreemap for
- // calculating the size and rendering
+ // FIXME: ideas on how to turn this into a HAMT sharding on some heuristic. we probably
+ // need to introduce states in to the "iterator":
+ //
+ // 1. bucketization
+ // 2. another post order visit of the buckets?
+ //
+ // the nested post order visit should probably re-use the existing infra ("message
+ // passing") and new ids can be generated by giving this iterator the counter from
+ // BufferedTreeWriter.
+ //
+ // could also be that the HAMT shard building should start earlier, since the same
+ // heuristic can be detected *at* bufferedtreewriter. there the split would be easier, and
+ // this would "just" be a single node rendering, and not need any additional states..
+
+ // track the combined size which we'll report to our parent
let mut combined_from_links = 0;
+ // TODO: this could quite easily be made so that the links are read from the btreemap for
+ // calculating the size and rendering
let flat = FlatUnixFs {
links: links
.iter() // .drain() would be the most reasonable
