Move LazySpan rows through one retained offset

This commit is contained in:
iris committed 2026-09-09 16:15:09 -04:00
1 parent 0aa03cf621
commit fffed42f9e
13 files changed
+503 -104

No files matched your search

+14 -8
View File
@@ -670,8 +670,10 @@ The trap that only the rig could have caught: writing an entry is not the
same as changing it. Recycling rewrote every glyph of every moved row with
identical bytes, marking 73% of the glyph array against 0.6% genuinely
changed. `PrimitiveVec::set` and `Primitives::set_instance` compare before
marking, and `arena_churn` prints both numbers so the gap cannot reopen
unnoticed.
marking. Layout can also write a provisional instance and restore it within
one frame; `Primitives` remembers the pre-frame bytes and cancels that dirty
bit when the GPU-visible result is unchanged. `arena_churn` prints both
numbers so either gap cannot reopen unnoticed.
**Layout has no measurement mode.** A widget is drawn provisionally only
when its size cannot be known yet, and that retained drawing is moved into
@@ -685,12 +687,16 @@ Measured over the fixture's 401 streamed events: the busiest frame makes
Streamed-frame CPU p50 is 0.35ms, from 1.18ms before this layout change.
Arena size and upload floors are unchanged.
**What is left, and it is a layout question rather than an upload one.**
Stream instances upload 71.9%, against a 71.8% floor: the list is pinned to
the newest end, so a growing reply moves every row, and a row's instances
carry an absolute region. Moving a subtree is supposed to be one
`move_offsets` write (LAYOUT.md section 2); something on this path is
redrawing instead.
Pinned growth now uses the same subtree translation as scrolling. A
container can retain a child-coordinate move slot through
`Painter::set_child_offset`; `LazySpan` keeps retained rows in stable local
boxes and changes that one slot when its anchor moves. It still walks the
visible run to virtualise it, but unchanged rows no longer acquire new
absolute primitive regions. Over the fixture's 401 streamed events, instance
upload is **2.9% against a 2.9% floor**, from 71.9% against 71.8%; median
instance bytes per frame are **1,728**, from 176,496. This is framework
layout/rendering behaviour and the transcript screen contains no special
case for it.
### The Android release profile is `opt-level = 3`, not `"s"` (2026-09-09)