From b1dfe54ca47d68e2f831affb63d581eef08441b4 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:08:52 -0700 Subject: [PATCH] perf(orcad): drop the event-loop turns around the runtime imports (#35568) The lane showed they never let the daemon fork land earlier in a way that moved readiness (#35514 measured an earlier fork with no ready-time gain), so they only add two loop turns to startup. --- src/main/orcad/orcad-entry.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/orcad/orcad-entry.ts b/src/main/orcad/orcad-entry.ts index 32e7fd92a28..99ccb07a41f 100644 --- a/src/main/orcad/orcad-entry.ts +++ b/src/main/orcad/orcad-entry.ts @@ -78,12 +78,7 @@ async function startOrcadRuntime( // mid-spawn. It disconnects without killing daemon PTYs that must survive restart, after an // in-flight spawn settles; a failed one leaves only the disconnect to do. registerCleanup(() => daemonStartup.catch(() => {}).then(() => stopOrcadDaemon())) - // Bundled imports resolve as microtasks; a turn of the loop lets a finished login env spawn the - // daemon (a separate process) while the runtime graph evaluates. - const yieldToLoop = () => new Promise((resolve) => setImmediate(resolve)) - await yieldToLoop() const { OrcaRuntimeService } = await import('../runtime/orca-runtime') - await yieldToLoop() const { OrcaRuntimeRpcServer } = await import('../runtime/runtime-rpc') const { registerHeadlessPtyRuntime } = await import('../ipc/pty/register-headless-runtime') const { getLocalPtyProvider } = await import('../ipc/pty/provider/registry')