Precise DOM morphing
morphing typescript dom

remove todo checklist from optimization commit

-12
-12
todo.md
··· 1 - - [ ] Precompute `to` element matching hints (`id`, `name`, `href`, `src`) in `visitChildNodes` to reduce repeated `getAttribute` calls. 2 - - [ ] Split candidate pools by `localName` once (small `Map<string, number[]>`) so matching passes scan fewer candidates. 3 - - [ ] Cache `candidate` element attribute hints (`name`/`href`/`src`) for heuristic matching instead of reading per comparison. 4 - - [ ] Add an early fast path for identical child list lengths + stable id order to skip some matching passes. 5 - - [ ] Reuse scratch arrays/typed arrays in `Morph` (size-grow strategy) to reduce per-call allocations in hot paths. 6 - - [ ] Reduce `nodeListToArray` churn by using a shared reusable buffer for child snapshots when safe. 7 - - [ ] Try replacing `Map<string, number[]>` for exact-id matches with a compact struct for the common single-index case. 8 - - [ ] Add a narrow fast path for text-only child updates before running full child diff. 9 - - [x] Benchmark preserving dirty form controls separately for text inputs vs checkboxes to target real bottlenecks. 10 - - [ ] Consider skipping LIS when match order is already monotonic (cheap monotonicity check first). 11 - - [x] Add a benchmark case for deep nested id-set trees (many ancestors per id) to pressure `#mapIdSets`/`#mapIdArrays`. 12 - - [x] Add a benchmark flag preset (`--repeats 3 --thorough`) helper script to standardize decision runs.