mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 16:18:55 +00:00
Chased the "stream frame p95 = 60ms with ZERO longtasks" mystery to its actual cause: the default stream chunk had no paragraph breaks, so it grew into one giant ~22KB block that re-rendered fully every flush — defeating the block memoization real streaming relies on. Plain text = 21ms; realistic chunk with `\n\n` breaks (blocks settle, only the tail re-renders) = 23ms. Fixed the default chunk to model real LLM output; a break-less `--chunk` remains available as a single-block worst-case stress. Also hardened the isolated instance so measurements reflect real cost: - Wait for the gateway socket to actually connect before measuring (a booting/ absent backend's reconnect backoff churns the main thread). Exposed via a new __PERF_DRIVE__.connected() probe reading $gateway.connectionState. - Focus emulation + anti-throttle/occlusion flags so a backgrounded perf window isn't frame-throttled (no OS focus stealing). - Generation-guarded the rAF frame recorder so repeated runs don't leave overlapping recorders polluting frame intervals. Baseline re-captured as the median of 5 --spawn runs (darwin-arm64); all three CI scenarios now green and stable. Absolute values are dev-build (noted in _meta) — regression guards, not shipped numbers. |
||
|---|---|---|
| .. | ||
| perf | ||
| .gitignore | ||
| after-pack.mjs | ||
| assert-dist-built.mjs | ||
| assert-dist-built.test.mjs | ||
| assert-root-install.mjs | ||
| before-build.mjs | ||
| before-pack.mjs | ||
| before-pack.test.mjs | ||
| bundle-electron-main.mjs | ||
| click-session.mjs | ||
| dev-no-hmr.mjs | ||
| diag-jump.mjs | ||
| diag-scroll-reset.mjs | ||
| eval.mjs | ||
| gen-share-codes.ts | ||
| notarize-artifact.mjs | ||
| notarize.mjs | ||
| patch-electron-builder-mac-binary.mjs | ||
| probe-renderer.mjs | ||
| probe-thread.mjs | ||
| profile-typing-lag.md | ||
| rebuild-native.mjs | ||
| reload-renderer.mjs | ||
| reload.mjs | ||
| run-electron-builder.mjs | ||
| set-exe-identity.mjs | ||
| stage-native-deps.mjs | ||
| stage-native-deps.test.mjs | ||
| test-desktop.mjs | ||
| utils.mjs | ||
| write-build-stamp.mjs | ||