perf(qt): recycle the album page's track list, on a uniform-cell ListView

DID NOT DELIVER ITS GOAL. Read this before extending it: the wheel scroll on
a 189-track album is essentially unchanged. The page is correct and the
structure is better, but the theory that motivated the work is not supported.

What the work assumed: the ceiling was the `Repeater`, which has no windowing
and so built all 189 track blocks — each a Column with a disc-header Loader, a
work-header Loader (both gated on DATA, never on the viewport, so every act and
scene header in a Wagner box was alive) and the band-gated row. Roughly a
thousand structural items before counting anything visible.

What it is now: one ListView over a UNIFORM 10px cell tape. Each piece of
content owns a run of cells, its visual item lives in the first cell of the run
and paints over the inert ones — 50px row = 5 cells, 40px header = 4, rail =
29. Uniform cells are the point: measured in a standalone probe, a ListView
with variable delegates ESTIMATES contentHeight and ignores an explicit
override (5703 then 5396 against an exact 5400), which makes the scrollbar
thumb resize and skip as sizes are discovered. With uniform cells,
count * 10 is exact from the first frame, so the scrollbar the owner had just
called the best gesture on the page keeps its behaviour.

Falling out of the design, replacing machinery that was reverted a commit ago:
`cacheBuffer` incubates upcoming delegates asynchronously in idle time, so a
heavy rail is built before it is visible without a hand-rolled band, a settle
Timer, or an unload grace — and without the "reach the bottom, then wait" that
made the owner reject that approach.

Two correctness items that came with it:
  * `header` is a ListView property. The page's own `header` had to become
    `albumHeader` or every `header.x` binding inside the view would silently
    resolve against the view's header instead. One handler was missed in the
    rename and QML refused to create the component at all — the whole page
    rendered black, and no static gate caught it because the failure happens at
    instantiation.
  * `recycleActive` on the shared TrackRow, default true, gates the row's
    Connections. Without it a pooled row keeps listening and consumes a cache
    or favourite settle signal meant for a different track. Every other host
    is unaffected by the default.

WHAT THIS RESULT MEANS, for whoever picks it up: delegate count and
construction cost are NOT what makes this page feel heavy. Removing ~950
structural items changed nothing the owner could feel, which points at
per-frame cost instead — consistent with his own observation that the page is
sluggish ALWAYS, not only while it loads, and with the documented finding that
this shell's bill is full-window presents rather than scene work. Do not
re-attempt a structural rewrite here on intuition. Take the QSG_RENDER_TIMING
split (polish/sync vs render) on this exact album first; the earlier reference
scene measured polish=0ms, render=2ms, swap=12-24ms.

Design and probes came from an independent review; the rebase onto the current
tree, the black-screen fix and the API verification are mine.

cc
This commit is contained in:
vicrodh committed 2026-08-18 23:28:25 -06:00
1 parent 3fdccae22e
commit 047db8ea9f
2 files changed
+477 -370

No files matched your search

File diff suppressed because it is too large. Load diff