Clean up unused worker threads for closed apps; other performance optimizations

This commit is contained in:
James Babcock committed 2026-09-22 14:56:54 -07:00
1 parent 9560f3ac8d
commit 2e4d20e130
20 files changed
+360 -13

No files matched your search

+7
View File
@@ -11,6 +11,7 @@
* focus, tap-then-hold opens the window menu.
*/
import "@nativescript/core/globals";
import { finishWorkerShutdown } from "../../ui/shell/worker-lifecycle";
import { GrayImage } from "../../graphics/image";
import { flattenPlanesWithDraws, planesFingerprint, type Plane } from "../../graphics/plane";
import { prepareFrameDraws } from "../../graphics/glyph-wire";
@@ -187,6 +188,12 @@ post({ type: "worker-ready" });
global.onmessage = (event: { data: WorkerAppMessage }) => {
const message = event.data;
switch (message.type) {
case "check-idle":
post({ type: "worker-idle" });
break;
case "shutdown":
finishWorkerShutdown();
break;
case "open-window": {
const window: BlocksWindow = {
windowId: message.windowId,