mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 00:19:35 +00:00
chore: add startup timing diagnostics for #270
Add [STARTUP] timing logs to Rust setup (plugin registration, storage open, migration) and Vue frontend (onMounted, initFromStorage, initFromDisk) to help diagnose slow startup reported in #270.
This commit is contained in:
+10
-1
@@ -466,10 +466,16 @@ function onLoginSuccess() {
|
||||
}
|
||||
|
||||
function initApp() {
|
||||
const t0 = performance.now();
|
||||
console.log("[STARTUP] initApp begin");
|
||||
savedSqlStore
|
||||
.initFromStorage()
|
||||
.then(() => connectionStore.initFromDisk())
|
||||
.then(() => {
|
||||
console.log(`[STARTUP] savedSqlStore.initFromStorage: ${(performance.now() - t0).toFixed(0)}ms`);
|
||||
return connectionStore.initFromDisk();
|
||||
})
|
||||
.then(() => {
|
||||
console.log(`[STARTUP] connectionStore.initFromDisk: ${(performance.now() - t0).toFixed(0)}ms`);
|
||||
reconnectRestoredTabs();
|
||||
})
|
||||
.catch((e: any) => {
|
||||
@@ -501,6 +507,8 @@ function handleContextMenu(e: MouseEvent) {
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
console.log("[STARTUP] onMounted begin");
|
||||
const mountStart = performance.now();
|
||||
applyTheme();
|
||||
window.addEventListener("keydown", handleKeydown, true);
|
||||
if (isDesktop) {
|
||||
@@ -541,6 +549,7 @@ onMounted(async () => {
|
||||
})
|
||||
.catch(() => {});
|
||||
setupTauriListeners();
|
||||
console.log(`[STARTUP] onMounted sync done: ${(performance.now() - mountStart).toFixed(0)}ms`);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user