improved perfs and event management

This commit is contained in:
Martino Ferrari committed 2026-10-13 23:00:42 +02:00
1 parent 667ed0c100
commit bb99be5889
17 files changed
+626 -59

No files matched your search

@@ -31,6 +31,21 @@ Part of [CLAUDE.md](../../CLAUDE.md). These are rules that cost a defect to lear
reasons (an event pin) call `sync_window_display()` alone, which only restates the control and
never moves the plot — calling `apply_time_window()` there would clamp a legitimately short
capture up to the requested window.
- **With nothing bound, `set_time_window()` frames `{-window, 0}` and never `{0, window}`.** Under
a following x group a range states two things — its span, and *through its maximum* where the
window sits behind the live edge — so a maximum **at** the edge is what makes the offset zero.
When there is a live edge to read that is `{newest - window, newest}`; when there is not, the
edge the live view would put at x = 0 is 0, so the equivalent statement is `{-window, 0}`.
Asking for `{0, window}` there is an offset of a *whole window*. This is not a rare fallback:
"no samples bound" is the state every structural change leaves behind, and
`apply_time_window()` re-plans the rings and *then* calls this, so it is the axis a mode change
is drawn with until the first sample lands. With `{0, window}` the two or three frames after
every event or waveform open drew the time base one screen to the left of where the following
frames drew it — a trace that jumps a screen sideways and comes back, which is what "opening
events or even waveform sometime result in data flickering (like time base) and is unusable"
was. The reading is the dump's traceless paint counts: `mode=live` 38 → 0 and `mode=waiting`
2 → 40, the latter being the point — a waiting view now paints its empty axis in the *same*
place every frame instead of twitching into a framed one.
- **The x labels go relative on the tick *step against the label resolution at the axis'
magnitude*, never on the span.** `RowSet::update_time_labels()`'s question is only ever "can
this step be written at this magnitude": `TickFormat::Time` carries three significant figures