Signals: shared-memory index, snappier interaction & date/time x-axis#29
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performance — responsiveness
FileHandler.getScanContext()builds the byte-offset index once per file intoSharedArrayBuffers 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.trendWorkerClientno longer transfers buffers (shared by reference).Date/time x-axis
extractSignalSeriesparses each bucket's wall-clock timestamp from its log line →x.timeMs(worker passesparseTimestampFast).HH:MM:SS, orMM/DD HH:MMacross 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 +
timeMsverified end-to-end on fixtures..mcp.jsonintentionally excluded.🤖 Generated with Claude Code