Closed achingbrain closed 5 years ago
This PR decreases the time it takes to read a file from the HAMT shard that backs our npm-on-ipfs registry from about three minutes (😱) down to about a second, so I'm going to merge this and address the outstanding issues in further PRs.
Since bucket indexes are stable based on the file input and current tree state, we can predict which subshard will contain a given file based on how deep we are in the hamt, so there's no need to traverse the entire shard to find one file.
Fixes #9