Unverified Commit 00817437 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

[Turbopack] fix task optimization by removing children count (#74907)

### What?

fix an earlier PR by completely removing children count
parent 5de932a4
......@@ -23,7 +23,9 @@ use crate::{
invalidate::{make_task_dirty, TaskDirtyCause},
ExecuteContext, Operation, TaskGuard,
},
storage::{get, get_many, iter_many, remove, update, update_count, update_ucount_and_get},
storage::{
count, get, get_many, iter_many, remove, update, update_count, update_ucount_and_get,
},
TaskDataCategory,
},
data::{
......@@ -1860,7 +1862,7 @@ impl AggregationUpdateQueue {
let _span = trace_span!("check optimize").entered();
let task = ctx.task(task_id, TaskDataCategory::Meta);
let children_count = get!(task, ChildrenCount).copied().unwrap_or_default();
let children_count = count!(task, Child);
if children_count == 0 {
return;
}
......
......@@ -365,9 +365,6 @@ pub enum CachedDataItem {
task: TaskId,
value: (),
},
ChildrenCount {
value: u32,
},
// Cells
CellData {
......@@ -497,7 +494,6 @@ impl CachedDataItem {
}
CachedDataItem::Dirty { .. } => true,
CachedDataItem::Child { task, .. } => !task.is_transient(),
CachedDataItem::ChildrenCount { .. } => true,
CachedDataItem::CellData { .. } => true,
CachedDataItem::CellTypeMaxIndex { .. } => true,
CachedDataItem::OutputDependency { target, .. } => !target.is_transient(),
......@@ -553,7 +549,6 @@ impl CachedDataItem {
match self {
Self::Collectible { .. }
| Self::Child { .. }
| Self::ChildrenCount { .. }
| Self::CellData { .. }
| Self::CellTypeMaxIndex { .. }
| Self::OutputDependency { .. }
......@@ -595,7 +590,6 @@ impl CachedDataItemKey {
}
CachedDataItemKey::Dirty { .. } => true,
CachedDataItemKey::Child { task, .. } => !task.is_transient(),
CachedDataItemKey::ChildrenCount {} => true,
CachedDataItemKey::CellData { .. } => true,
CachedDataItemKey::CellTypeMaxIndex { .. } => true,
CachedDataItemKey::OutputDependency { target, .. } => !target.is_transient(),
......@@ -639,7 +633,6 @@ impl CachedDataItemType {
match self {
Self::Collectible { .. }
| Self::Child { .. }
| Self::ChildrenCount { .. }
| Self::CellData { .. }
| Self::CellTypeMaxIndex { .. }
| Self::OutputDependency { .. }
......
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