Files
Claude e31f57677b perf(devtools): Kind Lookup folds only changed groups and drops stale publishes
The sampler re-folded every group, both groupings, under the collector
lock on each 300 ms progress publish, and still computed per-tag counts,
tag lengths and content-format shares that the screen no longer shows.

- KindVariant loses formats and tags (and TagUsage goes); the content
  format still keys the shape grouping
- each group caches its KindVariant until it gains an event, so a
  publish sorts the cached snapshots and unchanged cards keep the same
  instance
- measured on the JVM, 5,000 events in ~4,900 shapes: a publish went
  from 15-17 ms to ~0.5 ms, adding the events from 84-97 ms to ~70 ms

Fixes a race: cancelling or re-running did not stop a publish already
in flight, so its late write could put a stopped lookup back in the
running state (stop icon and progress bar stuck) or show the previous
run's counts under a re-run. Each run now holds a token and only the
current run may write the state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8YCZ4LiTaQX3PUoAitfcN
2026-10-21 17:38:42 +00:00
..