Skip to content

Commit ff75526

Browse files
committed
add comment
1 parent 0b35f0d commit ff75526

File tree

1 file changed

+4
-0
lines changed
  • turbopack/crates/turbopack-trace-server/src

1 file changed

+4
-0
lines changed

turbopack/crates/turbopack-trace-server/src/store.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ use crate::{
1616

1717
pub type SpanId = NonZeroUsize;
1818

19+
/// This max depth is used to avoid deep recursion in the span tree,
20+
/// which can lead to stack overflows and performance issues.
21+
/// Spans deeper than this depth will be re-parented to an ancestor
22+
/// at the cut-off depth (Flattening).
1923
const CUT_OFF_DEPTH: u32 = 80;
2024

2125
pub struct Store {

0 commit comments

Comments
 (0)