mirror of
https://github.com/sveltejs/svelte.git
synced 2024-11-30 17:00:40 +01:00
04bc37de31
* Implement new hydration optimization During hydration, greedily pick nodes that exist in the original HTML that should not be detached. Detach the rest. * Implement optimal reordering during hydration During hydration we track the order in which children are claimed. Afterwards, rather than reordering them greedily one-by-one, we reorder all claimed children during the first append optimally. The optimal reordering first finds the longest subsequence of children that have been claimed in order. These children will not be moved. The rest of the children are reordered to where they have to go. This algorithm is guaranteed to be optimal in the number of reorderings. The hydration/head-meta-hydrate-duplicate test sample has been modified slightly. The order in which the <title> tag is being generated changed, which does not affect correctness. * Fix issue potentially causing extra reorders Not sorting children before executing the `insertBefore` calls in `init_hydrate` potentially caused extra `insertBefore` calls in `append` * Simplify`init_hydrate` sorting logic |
||
---|---|---|
.. | ||
samples | ||
index.ts |