grid: skip the per-cell ISO-protection resolve when no protected style exists #418
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!418
Loading…
Reference in a new issue
No description provided.
Delete branch "grid/iso-protect-skip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #409
EL / ED / ECH go through the ISO-aware erase, which resolved every blanked cell's style to test
ISO_PROTECTED. Almost no stream issues SPA, so on kitten's csi payload (EL 2 per chunk) that lookup bought nothing.Shape
StyleTable::has_iso_protected:internsets it when the interned pen carriesISO_PROTECTED, andcompactrecomputes it from the surviving entries.range_blank_innerhonors protection only while it is set.The issue proposed a sticky grid flag set at SPA. This version keeps the flag a function of the table's entries instead. Any
StyleId(a live cell, a saved screen's cell, scrollback in the primary ring, a stale pen id) can only resolve to an entry of this table, and an out-of-range id resolves to the default pen. So while the flag is clear, no cell can be protected, however the id got there. It also lets the gate close again after a sweep drops the last protected pen, where a sticky flag would keep charging the session.What could make it stale, and why it can't:
Grid, so the table is freshinternWith the flag clear, an ISO-aware erase to row end also lowers the row's watermark, as the plain erase does, since nothing can survive it.
Tests
has_iso_protected()equals "some id resolves to a protected pen" across arbitrary interns and compactions.Grid::gc_stylesandScreenBuffer::gc_styles(the daemon'sTableGcpath), a sweep followed by DECRC of a protected pen, RIS, the alternate screen with a sweep while on it, and resize; a protected survivor keeps the row content in view.compactthat clears the flag unconditionally fails three of the new tests. The watermark test fails without the gate.respectsISOProtection, DECSERAdoesNotRespectISOProtect) passes.Measurements
These use
measure_parse_into_grid_flooron kitten's csi payload at 35x106, comparing the release test binary fromorigin/main8a6c0361with this branch. The runs alternated, 6 of each, at load average 2.7 (uptime):instructions:uThe perf-trace cost map now records the gate and what the resolve costs without it.