orca/config
Neil ad87bb0123
perf(editor): skip markdown TOC parse while the panel is closed (#6695)
The rich markdown editor rebuilt the entire Table-of-Contents outline on
every content change by running a full-document remark parse
(buildMarkdownTableOfContents), then discarded the result whenever the TOC
panel was closed — which is the default state. The parse is driven by the
300ms-debounced serialize path, so it fired ~3x/sec during sustained typing,
with cost scaling linearly with document size.

Gate the memo on showTableOfContents so the parse only runs when the panel is
actually open. Including showTableOfContents in the deps rebuilds the outline
the moment the panel opens, so there is no stale TOC.

Benchmark (config/scripts/markdown-toc-parse-benchmark.mjs), per content
change while typing:
  175 KiB doc / 200 headings -> ~65 ms median  (13.2 s cumulative over a
                                                 ~1 min typing burst)
  351 KiB doc / 400 headings -> ~138 ms median (27.8 s cumulative)
With the fix this drops to ~0 ms while the panel is closed.

Adds a unit test proving the parse is skipped (and a stable empty-array
reference returned) while closed, and still runs when open.

Co-authored-by: Orca <help@stably.ai>
2026-06-28 21:19:10 -07:00
..
patches Update xterm beta packages (#6486) 2026-06-27 02:37:23 -07:00
scripts perf(editor): skip markdown TOC parse while the panel is closed (#6695) 2026-06-28 21:19:10 -07:00
dev-app-update.yml
electron-builder.config.cjs build: publish linux arm64 release artifacts (#4755) 2026-06-22 01:07:16 -07:00
localization-audit.md Improve localization catalog sync workflow (#5110) 2026-06-10 11:13:01 -07:00
localization-coverage-allowlist.json Add English localization infrastructure (#4995) 2026-06-09 10:43:04 -07:00
oxlint-react-doctor.json chore: gate high-signal react doctor rules 2026-05-31 22:35:15 -07:00
oxlint-switch-exhaustiveness.json chore: enforce exhaustive switch handling 2026-05-30 13:18:12 -07:00
packaged-runtime-node-modules.cjs feat(devin): managed hooks, sleeping resume, AI Vault (#5380) 2026-06-17 20:49:29 -07:00
tsconfig.cli.json feat(kimi): Kimi Code sessions in AI Vault + agent status hooks 2026-06-19 16:42:59 -07:00
tsconfig.node.json feat(telemetry): PR 2 — transport (client, validator, burst cap, IPC, build gate) (#1374) 2026-05-03 16:51:31 -07:00
tsconfig.relay.json Support agent status hooks over SSH (#1865) 2026-05-14 16:06:23 -07:00
tsconfig.tc.cli.json
tsconfig.tc.web.json Show and Filter Automation-Created Workspaces (#5697) 2026-06-18 13:05:57 -07:00
tsconfig.web.json chore: enforce exhaustive switch handling 2026-05-30 13:18:12 -07:00
vitest.config.ts Fix Windows ConPTY probe failures by removing startup control bytes (#5893) 2026-06-20 02:03:24 -07:00