hermes-agent/apps/desktop/scripts
Brooklyn Nicholson 81779fa6a0 perf(desktop): don't backfill the transcript while its thread streams
Switching to a STREAMING session took ~1.4s to settle while an idle
session settled in ~50ms. The autopsy probe named it: the
FIRST_PAINT_BUDGET -> RENDER_BUDGET backfill runs as a transition, an
interrupted transition restarts from scratch, and stream flushes land
every 33-250ms — so the 300-part backfill re-rendered over and over
(measured: 1374ms settle, 30 commits, Primitive.div x2237 for one switch).

Gate the backfill on the thread being idle. The user lands on the live
tail immediately either way; older turns backfill the moment the run
ends, and 'Show earlier' remains the manual path meanwhile.

Measured on the live app (diag-switch-autopsy, real sessions):
  switch to idle session        ~35-55ms settled (unchanged)
  switch to streaming session   1374ms -> backfill deferred; lands at
                                the live tail like any other switch

Adds diag-switch-autopsy.mjs (per-switch settle/commits/top-renders) and
live-drive.mjs (status/fps/drag one-liners against the running app).
2026-07-27 01:14:29 -05:00
..
perf perf(desktop): baseline multitab + render-churn, leave idle-cost report-only 2026-07-26 19:56:56 -05:00
.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-mock.mjs
dev-no-hmr.mjs
diag-code-live.mjs perf(desktop): 60fps sash drag on real sessions — height-gate the RO pins 2026-07-27 01:07:48 -05:00
diag-drag-churn.mjs
diag-drag-trace.mjs perf(desktop): share one ResizeObserver instead of one per consumer 2026-07-26 19:56:55 -05:00
diag-jump.mjs
diag-key-latency.mjs perf(desktop): 60fps sash drag on real sessions — height-gate the RO pins 2026-07-27 01:07:48 -05:00
diag-live-state.mjs perf(desktop): 60fps sash drag on real sessions — height-gate the RO pins 2026-07-27 01:07:48 -05:00
diag-real-loop.mjs perf(desktop): 60fps sash drag on real sessions — height-gate the RO pins 2026-07-27 01:07:48 -05:00
diag-ro-storm.mjs perf(desktop): share one ResizeObserver instead of one per consumer 2026-07-26 19:56:55 -05:00
diag-scroll-reset.mjs
diag-sidebar-dom.mjs perf(desktop): 60fps sash drag on real sessions — height-gate the RO pins 2026-07-27 01:07:48 -05:00
diag-switch-autopsy.mjs perf(desktop): don't backfill the transcript while its thread streams 2026-07-27 01:14:29 -05:00
diag-switch-trace.mjs perf(desktop): 60fps sash drag on real sessions — height-gate the RO pins 2026-07-27 01:07:48 -05:00
eval.mjs
gen-share-codes.ts
live-drive.mjs perf(desktop): don't backfill the transcript while its thread streams 2026-07-27 01:14:29 -05:00
notarize-artifact.mjs
notarize.mjs
patch-electron-builder-mac-binary.mjs
probe-model-picker.mjs
probe-renderer.mjs
probe-thread.mjs
profile-model-picker.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
write-build-stamp.test.mjs