We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 959e9e3 commit fbf7131Copy full SHA for fbf7131
turbopack/crates/turbo-tasks-backend/src/backend/operation/connect_child.rs
@@ -31,9 +31,15 @@ pub enum ConnectChildOperation {
31
impl ConnectChildOperation {
32
pub fn run(parent_task_id: TaskId, child_task_id: TaskId, mut ctx: ExecuteContext<'_>) {
33
let mut parent_task = ctx.task(parent_task_id, TaskDataCategory::All);
34
- parent_task.remove(&CachedDataItemKey::OutdatedChild {
35
- task: child_task_id,
36
- });
+ // Quick skip if the child was already connected before
+ if parent_task
+ .remove(&CachedDataItemKey::OutdatedChild {
37
+ task: child_task_id,
38
+ })
39
+ .is_some()
40
+ {
41
+ return;
42
+ }
43
if parent_task.add(CachedDataItem::Child {
44
task: child_task_id,
45
value: (),
0 commit comments