perf: delay admin prefetch after first screen
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ function warmAdminRuntimeAfterPaint() {
|
||||
void ensureAdminRuntime().catch(() => undefined);
|
||||
};
|
||||
|
||||
window.setTimeout(run, 350);
|
||||
window.setTimeout(run, 2_500);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,9 +31,6 @@ export default defineConfig(async (config) => {
|
||||
vxeTableLazyImport: false,
|
||||
},
|
||||
vite: {
|
||||
build: {
|
||||
modulePreload: false,
|
||||
},
|
||||
define: {
|
||||
'import.meta.env.VITE_APP_VERSION': JSON.stringify(appVersion),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user