apparently unnecessary?

incremental-batches
Rich Harris 1 week ago
parent 7034256ec3
commit c5377d3e81

@ -172,12 +172,6 @@ export class Batch {
*/
#new_effects = [];
/**
* Deriveds created while this batch was active.
* @type {Derived[]}
*/
#new_deriveds = [];
/**
* Deferred effects (which run after async work has completed) that are dirty
* @type {Set<Effect>}
@ -551,13 +545,6 @@ export class Batch {
this.#new_effects.push(effect);
}
/**
* @param {Derived} derived
*/
register_created_derived(derived) {
this.#new_deriveds.push(derived);
}
#committed = false;
#commit() {
@ -634,10 +621,6 @@ export class Batch {
}
}
for (const derived of this.#new_deriveds) {
batch.cvs.set(derived, -1);
}
// Only apply and traverse when we know we triggered async work with marking the effects
if (batch.#roots.length > 0) {
batch.apply();

@ -88,8 +88,6 @@ export function derived(fn) {
signal.created = get_error('created at');
}
current_batch?.register_created_derived(signal);
return signal;
}

Loading…
Cancel
Save