Skip to content

Keyed-list reconcile: LIS-minimal-move ≠ array-shift-minimal on UIElementCollection (research lever) #741

Description

@azchohfi

Context (backlog / de-prioritized research note)

PR #657 made the keyed-middle child reconcile correct (fixed the C1 rotation-identity + H1 stale-oracle bugs) via a right-to-left LIS anchor walk. That correctness costs ~+18.5% keyed-reconcile time (~0.77ms/render at 500 rows / 50% reorder) vs the prior left-to-right version — in exchange for #657's −30.9% / −98K B/render keyed alloc win (the shipped deliverable).

We investigated whether the time was recoverable. It is not, in scope — empirically proven:

Decision taken: accept the trade (keep the alloc win + correctness; accept the keyed-time cost). #738 (SIMD) closed as correct-but-no-gain.

The one open research lever (intentionally not pursued now)

A reconciler that minimizes total array-shift distance (Σ|from−to|) subject to COM-call overhead, instead of minimizing move count (LIS). The textbook DOM-optimal LIS (Vue3/Inferno) is not optimal for an array-backed collection where Move ≠ O(1). This is a research-grade reconciler redesign with high correctness risk on a surface that already produced two shipped bugs, for ~0.77ms of headroom on a synthetic stress workload — recommended against unless keyed-list reorder throughput becomes a priority.

Note: the keyed-list /perf leg (StressPerf.KeyedList) and the new Flex/Yoga leg (StressPerf.Flex, added in #737) can now measure any such future work.

Filed for the record so this isn't re-investigated; not an action item.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions