mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 17:47:40 +00:00
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.
This commit is contained in:
@@ -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<void>((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')
|
||||
|
||||
Reference in New Issue
Block a user