Skip to content

Commit 4139a21

Browse files
committed
fix: delay precache for 10s
Checking if CID is already in repo is expensive if the repo itself has a lot of blocks. This may freeze the Welcome Screen on initial start. Delaying background precache for 10s is a temporary fix until: 1. we finish async iterators migration 2. implement #878
1 parent c2c3f6b commit 4139a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

add-on/src/lib/ipfs-client/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async function _reloadIpfsClientDependents (instance, opts) {
7171
// online only
7272
if (client && instance) {
7373
// add important data to local ipfs repo for instant load
74-
precache(instance)
74+
setTimeout(() => precache(instance), 10000)
7575
}
7676
}
7777

0 commit comments

Comments
 (0)