Skip to content

perf(chat): skip grouping work for empty tool calls - #1432

Closed
blove wants to merge 3 commits into
mainfrom
blove/chat-empty-tool-groups
Closed

blove wants to merge 3 commits into
mainfrom
blove/chat-empty-tool-groups

Conversation

@blove

@blove blove commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

A streaming-tail update recreates historical message wrappers, which makes every empty tool-call host rebuild its subagent index and grouping intermediates. Return a fresh empty group list when the existing resolver has no tool calls, while preserving the host, its 20px spacing, public message inputs and the complete nonempty grouping path.

The real Chat regression mounts 1,000 historical messages plus a tail and observes actual subagent-map iteration. The unchanged implementation performed 501 iterations per tail update; this change performs zero. Tests preserve mounted hosts, fresh public messages, historical markdown identity, tool linkage mutations, subagents, projected templates and activity contexts. This is a deterministic work reduction; browser timing benefit is not yet established.

Validation:

  • 1,362 chat tests passed, including the new RED/GREEN work regressions and semantic transitions.
  • Scoped lint passed with zero errors and 65 warnings; genuine chat production build and nine dependencies passed.
  • Source boundaries and migration inventory checks passed. The inventory refresh changes only the matching three implementation facts and source provenance; dispositions are unchanged.
  • Independent correctness and quality review approved the final changeset.

The first native package-based comparison passed 24/24 functional and trace cases, but it does not establish a browser performance benefit: all six H10000 maximum task intervals were higher for this candidate. Follow ranges were 192–208 ms baseline versus 215–252 ms candidate; history-reading ranges were 179–236 ms versus 192–237 ms. Observed MinorGC counts were lower; long-task counts and layout were mixed. All twelve pairs are retained. The first cohort is exploratory and baseline-first on one machine; its adverse results remain retained separately. Style assertions use jsdom and do not establish native geometry. Existing native/trace admission checks remain authoritative. Raw traces remain local, cohort identities stay separate, and no FPS or CPU-time claim is made.

The separately declared post-F exploratory reverse-order cohort stopped after its ninth candidate case: all nine native checks passed, eight traces completed, and the ninth had no trace-completion event within the unchanged limit and retained an unknown original owner. The verifier stopped continuation; three candidate slots and all twelve baseline slots were unattempted. That cohort has zero qualified pairs and supplies no paired performance comparison. Its original incomplete/unsafe evidence is retained locally. A distinct event-waiter ownership fix was subsequently reviewed and merged in benchmark PR #183; it is not established as the cause of the missing completion or as a Threadplane regression. Both comparison arms use local package builds, not published-stock identities.

Disposition: closed without merging. A new, separately declared exploratory cohort H used the merged benchmark controller, candidate first and baseline second, and passed all 24 native and trace cases. H does not establish net renderer benefit: at H10000 the candidate maximum task interval was lower in five of six pairs but had a 263.863 ms follow spike versus 176.767 ms baseline; observed >=50 ms task counts were higher in five of six pairs. Historical-reading maxima were 157–163 ms candidate versus 186–249 ms baseline. These mixed observations cannot cancel cohort F, and changes in order, time and harness prevent causal attribution. All twelve H pairs remain local and separate from F and incomplete G.

The deterministic grouping-work reduction is real, but it is insufficient evidence to ship this as a performance improvement. The branch is retained for reference. Further work should isolate sustained Angular rendering with separately reviewed diagnostics rather than repeat aggregate maximum-task comparisons. These are local package builds carrying 0.3.4 metadata, not registry-stock results. Whole traces include observer work; task intervals are not CPU time or a complete event population. No FPS or ranking is supported.

@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Nov 2, 2026 7:07am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – threadplane — aa31ce11 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant