We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e67520 commit 17d5b7bCopy full SHA for 17d5b7b
1 file changed
turbopack/crates/turbo-tasks-backend/src/backend/operation/leaf_distance_update.rs
@@ -18,7 +18,14 @@ use crate::{
18
data::CachedDataItem,
19
};
20
21
+/// The maximum number of leaf distance updates to process before yielding back to the executor.
22
+/// This prevents long blocking operations and allows to interrupt the processing for persistent
23
+/// caching.
24
const MAX_COUNT_BEFORE_YIELD: usize = 1000;
25
+
26
+/// We avoid incrementing the leaf distance by 1 each time to avoid frequent updates.
27
+/// Instead we use a buffer zone that shrinks as the leaf distance increases.
28
+/// This constant defines the size of that buffer zone at leaf distance 0.
29
const BASE_LEAF_DISTANCE_BUFFER: u32 = 128;
30
31
/// An leaf distance update job that is enqueued.
0 commit comments