Skip to content

Commit 09703ae

Browse files
committed
add TODOs
1 parent 04a84ba commit 09703ae

File tree

1 file changed

+6
-0
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+6
-0
lines changed

packages/svelte/src/internal/client/reactivity/effects.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ export function pause_effects(effects, callback = noop) {
323323
pause_children(effects[i], transitions, true);
324324
}
325325

326+
// TODO: would be good to avoid this closure in the case where we have no
327+
// transitions at all. It would make it far more JIT friendly in the hot cases.
326328
out(transitions, () => {
327329
for (var i = 0; i < length; i++) {
328330
destroy_effect(effects[i]);
@@ -370,6 +372,8 @@ function pause_children(effect, transitions, local) {
370372
var sibling = child.next;
371373
var transparent = (child.f & IS_ELSEIF) !== 0 || (child.f & BRANCH_EFFECT) !== 0;
372374
// TODO we don't need to call pause_children recursively with a linked list in place
375+
// it's slightly more involved though as we have to account for `transparent` changing
376+
// through the tree.
373377
pause_children(child, transitions, transparent ? local : false);
374378
child = sibling;
375379
}
@@ -404,6 +408,8 @@ function resume_children(effect, local) {
404408
var sibling = child.next;
405409
var transparent = (child.f & IS_ELSEIF) !== 0 || (child.f & BRANCH_EFFECT) !== 0;
406410
// TODO we don't need to call resume_children recursively with a linked list in place
411+
// it's slightly more involved though as we have to account for `transparent` changing
412+
// through the tree.
407413
resume_children(child, transparent ? local : false);
408414
child = sibling;
409415
}

0 commit comments

Comments
 (0)