Closed achingbrain closed 2 weeks ago
I think the pinning benchmarks should be re-run with this PR before merging. The multiformats/block
.links()
function works by deserializing a block into an object, then recursively walking every property and yielding any value that can be turned into a CID
.
This could potentially be more expensive than deserializing a block, collecting CID
s during deserialization and then yielding them all as the DAGWalkers do.
we need to run benchmarks to ensure no perf regression
Perf seems fine - the benchmark added by https://github.com/ipfs/helia/pull/633 shows comparable performance between this branch and main.
Replace the codec-specific
.dagWalkers
property with a generic dag walker internally that uses theBlock
interface from themulticodecs
module..dagWalkers
property from the Helia interfacegetCodec
andgetHasher
to retrieve codecs and hashers by codeloadCodec
andloadHasher
options to allow sync or async loading of extra codecs/hashes in addition to staticlly configured ones in thecodecs
/hashers
keysBREAKING CHANGE: the
.dagWalkers
property has been removedChange checklist