perf: delay admin prefetch after first screen

This commit is contained in:
2026-06-22 15:11:11 +08:00
parent 75a7671a27
commit 84d6791b3c
3 changed files with 3 additions and 6 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ function prefetchLightPages(pageMap: ComponentRecordType) {
scheduleLightPrefetch(() => {
void ensureAdminRuntime().catch(() => undefined);
}, 250);
}, 2_800);
for (const [index, key] of PREFETCH_LIGHT_PAGE_KEYS.entries()) {
scheduleLightPrefetch(() => {
@@ -120,7 +120,7 @@ function prefetchLightPages(pageMap: ComponentRecordType) {
if (typeof loader === 'function') {
void loader().catch(() => undefined);
}
}, 450 + index * 160);
}, 3_200 + index * 220);
}
}
+1 -1
View File
@@ -35,7 +35,7 @@ function warmAdminRuntimeAfterPaint() {
void ensureAdminRuntime().catch(() => undefined);
};
window.setTimeout(run, 350);
window.setTimeout(run, 2_500);
}
/**