orbitdb-archive / ipfs-log

Append-only log CRDT on IPFS
https://orbitdb.github.io/ipfs-log/
MIT License
398 stars 55 forks source link

fix: dont pass fetchParallel log concurrency value to fetchAll entry concurrency #297

Closed zachferland closed 4 years ago

zachferland commented 4 years ago

Was still linearly fetching entries. Concurrency values passed to fetchParallel was undefined, then set to 1 or hash.length. It looks like this value was intended to be the fetchParrallel (log) concurrency. But is was also being passed to fetchAll in the fetchOne function. Often this value was 1 or much less than 32 so often fetched linearly or not much faster.

Otherwise the entry refs are awesome! saw huge speed up when syncing from remote ipfs node once parallelized, compared to before.

Let me know if this was not what was intended or if there is any code changes needed elsewhere with this.

aphelionz commented 4 years ago

LGTM! @shamb0t , @haadcode ?

shamb0t commented 4 years ago

Thanks @zachferland you're right, good catch!