hermes-agent/apps/desktop/scripts
Brooklyn Nicholson 4798994dce perf(desktop): mount tooltips lazily, and measure the idle cost
Adds an `idle-cost` scenario for the symptom Brooklyn reported: with a
thread spinning, resizing the sidebar feels slow. It holds N tiles busy,
pushes NO tokens, and measures the renderer's self-inflicted commit rate
plus fps while dragging the splitter and while typing.

It reproduces immediately. Five busy tiles, nothing streaming:

  idle commits   17.7/sec   (should be 0 — nothing is happening)
  drag           1.4 fps    p95 812ms, worst frame 1.9s
  typing         61 fps     (fine — this is specific to resize)

Attributing the drag window showed 105,385 TooltipProvider renders and
~15s of component time across a 60-frame gesture. Cause: `Tip` mounts a
full Radix provider + Tooltip per call site, and there are ~107 of them.
Radix's Tooltip holds real state and Popper subscribes to layout, so an
unrelated interaction re-rendered all of them.

Mounts the machinery lazily instead, on first hover/focus. Tooltip churn
drops ~4x (105k -> 26k) and drag doubles to 3fps.

Note `defaultOpen` on the armed Tooltip is load-bearing: the pointerenter
that armed it has already fired, so Radix never sees it and the tip mounts
silently closed. A test caught exactly that, and now guards it.

3fps is still bad — the remaining cost is the whole transcript
re-rendering per resize frame (MessagePrimitive.Parts 12,600 renders /
10.5s, Block/Ct 24,300 each, all 100% wasted). Separate fix.
2026-07-26 16:36:42 -05:00
..
perf perf(desktop): mount tooltips lazily, and measure the idle cost 2026-07-26 16:36:42 -05:00
.gitignore feat(desktop): Memory Graph — playable radial timeline of memories + skills 2026-06-30 00:54:21 -05:00
after-pack.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
assert-dist-built.mjs cleanup(desktop): remove 'use strict' in ts & mjs 2026-07-13 17:22:17 -04:00
assert-dist-built.test.mjs test(desktop): run scripts/ tests in vitest 2026-07-13 17:22:17 -04:00
assert-root-install.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
before-build.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
before-pack.mjs fix(windows): verify rebuilt Hermes.exe integrity before shipping it as an update (#69179) 2026-07-24 19:11:35 -07:00
before-pack.test.mjs fix(windows): verify rebuilt Hermes.exe integrity before shipping it as an update (#69179) 2026-07-24 19:11:35 -07:00
bundle-electron-main.mjs fix(desktop): stop using tsx to boot Electron main in dev 2026-07-08 22:40:51 -05:00
click-session.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
dev-mock.mjs feat(desktop/e2e): Playwright E2E suite with visual regression diffs 2026-07-20 11:44:40 -04:00
dev-no-hmr.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-jump.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-scroll-reset.mjs fix(desktop): stop chat scroll jumping by disabling native scroll anchoring 2026-06-02 23:08:01 -05:00
eval.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
gen-share-codes.ts feat(desktop): Memory Graph — playable radial timeline of memories + skills 2026-06-30 00:54:21 -05:00
notarize-artifact.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
notarize.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
patch-electron-builder-mac-binary.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
probe-model-picker.mjs perf(desktop): add model-picker open-latency probes 2026-07-26 01:10:22 -05:00
probe-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
probe-thread.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-model-picker.mjs perf(desktop): add model-picker open-latency probes 2026-07-26 01:10:22 -05:00
profile-typing-lag.md bench(desktop): systematized perf harness; sunset 12 one-off scripts (#67466) 2026-07-19 07:41:00 -04:00
rebuild-native.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
reload-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
reload.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
run-electron-builder.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
set-exe-identity.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
stage-native-deps.mjs fix(desktop): preserve node-pty helper in packaged app (#65611) 2026-07-16 11:58:50 +00:00
stage-native-deps.test.mjs fix(desktop): preserve node-pty helper in packaged app (#65611) 2026-07-16 11:58:50 +00:00
test-desktop.mjs change(ci/desktop): move desktop app build into check job 2026-07-13 17:22:17 -04:00
utils.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
write-build-stamp.mjs fix(desktop): stop hard-failing pack on non-git checkouts + fix ZIP-path autocrlf (supersedes #67643) (#67730) 2026-07-19 19:29:36 -04:00
write-build-stamp.test.mjs fix(desktop): stop hard-failing pack on non-git checkouts + fix ZIP-path autocrlf (supersedes #67643) (#67730) 2026-07-19 19:29:36 -04:00