shrink comment (the AI agent habit of referring to the behaviour of the code it just deleted is somewhat unhelpful)

pull/18267/head
Rich Harris 2 months ago
parent 45b12df4ac
commit 145a5cc204

@ -628,11 +628,7 @@ function reconcile(state, array, anchor, flags, get_key) {
var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;
if (is_animated) {
// Three batched phases minimise layout flushes. With the per-item
// `fix()` body each iteration forced two reflows (one for the
// `getComputedStyle` read, one for the post-absolute
// `getBoundingClientRect` read); batching brings the whole batch
// down to ~2 flushes total.
// Doing all the reads _then_ all the writes minimises layout flushes
for (i = 0; i < destroy_length; i += 1) to_destroy[i].nodes?.a?.measure();
for (i = 0; i < destroy_length; i += 1) to_destroy[i].nodes?.a?.capture_size();
for (i = 0; i < destroy_length; i += 1) to_destroy[i].nodes?.a?.set_position();

Loading…
Cancel
Save