Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf: large threads open from a viewport snapshot, and typing and streaming render less #18220

Closedmaria-rckswants to merge 244 commits intot3/perf-wave2 fromt3/perf-wave3opened View on GitHub

Showing 99 changed files with 98 additions and 10 deletions (loading 95).

x
0 of 99 viewed, 99 left
29 additions and 0 deletionsapps/desktop/scripts/main-process-bundle.test.mjsModified
View file
@@ -2,6 +2,7 @@
import * as NodeFSP from "node:fs/promises";
import * as NodeOS from "node:os";
import * as NodePath from "node:path";
+import * as NodeURL from "node:url";
import * as NodeVM from "node:vm";
import { build } from "vite-plus/pack";
import { assert, it } from "vite-plus/test";
@@ -110,6 +111,34 @@
});
​
+it("keeps the real desktop chunks from requiring the application entry", async () => {
+ // conf can evict the entry from the require cache. Lazy chunks must not require it.
+ const directory = await NodeFSP.mkdtemp(NodePath.join(NodeOS.tmpdir(), "t3-desktop-chunks-"));
+ try {
+ assert.ok(Array.isArray(desktopConfig.pack));
+ const packConfig = desktopConfig.pack.find((config) =>
+ Object.values(config.entry ?? {}).includes("src/main.ts"),
+ );
+ assert.ok(packConfig);
+ await build({
+ ...packConfig,
+ config: false,
+ cwd: NodeURL.fileURLToPath(new URL("..", import.meta.url)),
+ outDir: directory,
+ sourcemap: false,
+ onSuccess: undefined,
+ logLevel: "silent",