Skip to content

Commit ec2c206

Browse files
committed
avoid bubbling find and schedule into already scheduling parts of the graph
1 parent 3e74c9e commit ec2c206

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

turbopack/crates/turbo-tasks-backend/src/backend/operation/aggregation_update.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -601,18 +601,18 @@ impl AggregationUpdateQueue {
601601
}
602602
}
603603
if is_aggregating_node(get_aggregation_number(&task)) {
604-
// TODO if it has an `AggregateRoot` we can skip visiting the nested nodes since
604+
// if it has an `AggregateRoot` we can skip visiting the nested nodes since
605605
// this would already be scheduled by the `AggregateRoot`
606606
if !task.has_key(&CachedDataItemKey::AggregateRoot {}) {
607607
task.insert(CachedDataItem::AggregateRoot {
608608
value: RootState::new(ActiveType::CachedActiveUntilClean, task_id),
609609
});
610-
}
611-
let dirty_containers: Vec<_> = get_many!(task, AggregatedDirtyContainer { task } count if count.get(session_id) > 0 => *task);
612-
if !dirty_containers.is_empty() {
613-
self.push(AggregationUpdateJob::FindAndScheduleDirty {
614-
task_ids: dirty_containers,
615-
});
610+
let dirty_containers: Vec<_> = get_many!(task, AggregatedDirtyContainer { task } count if count.get(session_id) > 0 => *task);
611+
if !dirty_containers.is_empty() {
612+
self.push(AggregationUpdateJob::FindAndScheduleDirty {
613+
task_ids: dirty_containers,
614+
});
615+
}
616616
}
617617
}
618618
}

0 commit comments

Comments
 (0)