Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): opening a large database no longer blocks startup for minutes #19407

Closedthymikee(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/19407/headopened View on GitHub

Showing 6 changed files with 38 additions and 20 deletions (loading 3).

x
0 of 6 viewed, 6 left
3 additions and 1 deletionapps/desktop/src/window/DesktopApplicationMenu.tsModified
View file
@@ -106,8 +106,10 @@
return;
​
+ // The result dialogs need no main window. Opening one before the backend
+ // answers strands the renderer on a failed auth bootstrap.
const desktopWindow = yield* DesktopWindow.DesktopWindow;
- yield* desktopWindow.ensureMain;
+ yield* desktopWindow.activate;
yield* checkForUpdatesFromMenu;
}).pipe(Effect.withSpan("desktop.menu.handleCheckForUpdatesClick"));
​
33 additions and 15 deletionsapps/server/src/persistence/Sqlite.test.tsModified
View file
@@ -10,6 +10,7 @@
import * as Layer from "effect/Layer";
import * as SqlClient from "effect/sql/SqlClient";
​
+import { PLANNER_STATISTICS } from "./plannerStatistics.ts";
import { WAL_SIZE_LIMIT_BYTES } from "./Sqlite.ts";
import * as SqlitePersistence from "./Sqlite.ts";
​
@@ -66,31 +67,48 @@
}).pipe(Effect.provide(SqlitePersistence.layerMemory)),
);
​
-it.effect("collects planner statistics for an existing database on open", () => {