Unverified Commit 15d0fd47 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Turbopack: use batch add in connect children (#85623)

### What?

use batch add in connect children
parent abdbdb71
...@@ -12,7 +12,7 @@ use crate::{ ...@@ -12,7 +12,7 @@ use crate::{
Operation, TaskGuard, aggregation_update::InnerOfUppersHasNewFollowersJob, Operation, TaskGuard, aggregation_update::InnerOfUppersHasNewFollowersJob,
get_aggregation_number, get_uppers, is_aggregating_node, get_aggregation_number, get_uppers, is_aggregating_node,
}, },
data::CachedDataItem, data::{CachedDataItem, CachedDataItemType},
}; };
pub fn connect_children( pub fn connect_children(
...@@ -27,12 +27,13 @@ pub fn connect_children( ...@@ -27,12 +27,13 @@ pub fn connect_children(
let parent_aggregation = get_aggregation_number(&parent_task); let parent_aggregation = get_aggregation_number(&parent_task);
for &new_child in new_children.iter() { parent_task.extend_new(
parent_task.add_new(CachedDataItem::Child { CachedDataItemType::Child,
new_children.iter().map(|&new_child| CachedDataItem::Child {
task: new_child, task: new_child,
value: (), value: (),
}); }),
} );
let new_follower_ids: SmallVec<_> = new_children.into_iter().collect(); let new_follower_ids: SmallVec<_> = new_children.into_iter().collect();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment