Files
lijiaoqiao/ui-tui/src
Brooklyn Nicholson 2d693c865c perf(tui): spawn python gateway before loading @hermes/ink
Before: entry.tsx imports @hermes/ink (394KB bundle) + App + GatewayClient
in declaration order, then calls `gw.start()` at ~T=220ms. Python fork +
server.py import starts then.

After: only `GatewayClient` is statically imported (5ms, node builtins
only). `gw.start()` fires at ~T=5ms. @hermes/ink + App load in parallel
via `Promise.all(import(...))`. Python gets ~215ms of free runway to do
its own module import before node even finishes loading.

Net: session.info arrives ~150ms earlier in cold start. First React frame
timing is unchanged (still ~240ms — still gated by ink+app imports).

Removed a previously-tried warm-thread in server.py that pre-imported
`run_agent` in the background. Measured variance showed occasional
5-10s outliers (GIL thrashing); median gain was <100ms. Not worth the
non-determinism.
2026-04-16 15:21:49 -05:00
..
2026-04-15 23:29:00 -05:00
2026-04-14 12:50:22 -05:00
2026-04-07 23:59:11 -04:00
2026-04-15 14:14:01 -05:00
2026-04-16 14:48:29 -05:00
2026-04-15 16:34:58 -05:00
2026-04-15 14:14:01 -05:00