Skip to content

Signals: shared-memory index, snappier interaction & date/time x-axis#29

Merged
ozgesolidkey merged 1 commit into
mainfrom
feat/signals-perf-time-axis
Jun 30, 2026
Merged

Signals: shared-memory index, snappier interaction & date/time x-axis#29
ozgesolidkey merged 1 commit into
mainfrom
feat/signals-perf-time-axis

Conversation

@ozgesolidkey

Copy link
Copy Markdown
Contributor

Performance — responsiveness

  • FileHandler.getScanContext() builds the byte-offset index once per file into SharedArrayBuffers and caches it (rebuild only on line-count change, cleared on close). The trend worker reads that shared memory directly → zero-copy / zero-transfer hand-off. The per-call O(n) index copy on the main process (which made the Signals tab slow to open and clicks laggy) is gone.
  • trendWorkerClient no longer transfers buffers (shared by reference).
  • Signals tab auto-discover deferred to the next frame → panel paints/interactive immediately while the off-thread scan fills the list.
  • Chart clicks paint the crosshair/value-box synchronously (instant feedback), then defer the viewer jump a frame (Signals + Trends).

Date/time x-axis

  • extractSignalSeries parses each bucket's wall-clock timestamp from its log line → x.timeMs (worker passes parseTimestampFast).
  • Signals x-axis labels show real date/time (HH:MM:SS, or MM/DD HH:MM across days) when the log is timestamped; falls back to #index / SI number otherwise. Hover readout + click value box lead with the full timestamp.

Build green; 319/319 tests pass; SAB worker + timeMs verified end-to-end on fixtures. .mcp.json intentionally excluded.

🤖 Generated with Claude Code

Performance (responsiveness):
- FileHandler.getScanContext() builds the byte-offset index ONCE per file into
  SharedArrayBuffers and caches it (rebuild only when the line count changes,
  cleared on close). The trend worker reads that shared memory directly, so
  handing the index over is zero-copy / zero-transfer — the per-call O(n) copy
  on the main process that made the Signals tab slow to open and clicks laggy
  is gone.
- trendWorkerClient no longer transfers buffers (they're shared by reference).
- Signals tab auto-discover is deferred to the next frame so the panel paints
  and is interactive immediately while the (off-thread) scan fills the list.
- Chart clicks paint the crosshair/value-box synchronously for instant
  feedback, then defer the viewer navigation a frame (Signals + Trends charts).

Date/time x-axis:
- extractSignalSeries parses each bucket's wall-clock timestamp from its log
  line and returns it as x.timeMs (worker passes parseTimestampFast in).
- The Signals x-axis labels ticks with real date/time (HH:MM:SS, or MM/DD HH:MM
  across days) when the log is timestamped; falls back to #index / SI number
  otherwise. Hover readout and the click value box lead with the full timestamp.

Build green; 319 tests pass; SAB worker + timeMs verified end-to-end on fixtures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ozgesolidkey
ozgesolidkey merged commit 8d0534c into main Jun 30, 2026
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