Skip to content

Commit

Permalink
more preload in download
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Nov 5, 2024
1 parent 5ee0164 commit 22d4e54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ module.exports = class Hyperdrive extends ReadyResource {
return
}

// first preload the list so we can use the full power afterwards to actually preload everything
// eslint-disable-next-line
for await (const _ of this.list(folder, opts)) {
// ignore
}

for await (const entry of this.list(folder, opts)) {
const b = entry.value.blob
if (!b) continue
Expand Down

0 comments on commit 22d4e54

Please sign in to comment.