forking-hell
Rich Harris 6 days ago
parent 18ecf01382
commit 739f5fc1c6

@ -182,8 +182,6 @@ export class Batch {
#traverse_effect_tree(root) { #traverse_effect_tree(root) {
root.f ^= CLEAN; root.f ^= CLEAN;
var should_defer = false;
/** @type {EffectTarget} */ /** @type {EffectTarget} */
var target = { var target = {
parent: null, parent: null,
@ -236,26 +234,16 @@ export class Batch {
effect = effect.next; effect = effect.next;
while (effect === null && parent !== null) { while (effect === null && parent !== null) {
if (parent.b !== null) { if (parent === target.effect) {
var ready = parent.b.local_pending_count === 0; // TODO rather than traversing into pending boundaries and deferring the effects,
// could we just attach the effects _to_ the pending boundary and schedule them
if (target.parent === null) { // once the boundary is ready?
should_defer ||= !ready;
} else if (parent === target.effect) {
if (ready) {
// TODO can this happen?
target.parent.effects.push(...target.effects);
target.parent.render_effects.push(...target.render_effects);
target.parent.block_effects.push(...target.block_effects);
} else {
this.#defer_effects(target.effects); this.#defer_effects(target.effects);
this.#defer_effects(target.render_effects); this.#defer_effects(target.render_effects);
this.#defer_effects(target.block_effects); this.#defer_effects(target.block_effects);
}
target = /** @type {EffectTarget} */ (target.parent); target = /** @type {EffectTarget} */ (target.parent);
} }
}
effect = parent.next; effect = parent.next;
parent = parent.parent; parent = parent.parent;

Loading…
Cancel
Save