Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions crates/uffs-mft/src/index/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,7 @@ impl MftIndex {
tracing::debug!("[TRIP] MftIndex::from_parsed_records -> Phase 2: ExtensionIndex::build");
index.extension_index = Some(ExtensionIndex::build(&index));

// 2. Sort directory children for natural ordering (Phase 4)
// CRITICAL: Must run BEFORE computing tree metrics for correct size
// aggregation.
tracing::debug!("[TRIP] MftIndex::from_parsed_records -> Phase 4: sort_directory_children");
index.sort_directory_children();

// 3. Compute tree metrics for directory statistics (Phase 5)
// Must run AFTER sorting - depends on sorted child traversal order.
// 2. Compute tree metrics for directory statistics (Phase 5)
tracing::debug!("[TRIP] MftIndex::from_parsed_records -> Phase 5: compute_tree_metrics");
index.compute_tree_metrics();

Expand Down
3 changes: 0 additions & 3 deletions crates/uffs-mft/src/index/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ impl MftIndex {
debug!("🔨 Building extension index...");
self.extension_index = Some(ExtensionIndex::build(self));

debug!("🔨 Sorting directory children...");
self.sort_directory_children();

debug!("🔨 Computing tree metrics...");
self.compute_tree_metrics();

Expand Down
7 changes: 0 additions & 7 deletions crates/uffs-mft/src/io/readers/parallel/to_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,6 @@ impl ParallelMftReader {
"✅ Sliding window IOCP with direct-to-index parsing complete (I/O overlap analysis)"
);

// Compute tree metrics (size/allocated_size/descendant_count) for all
// directories This is required for parity with the legacy multi-pass
// pipeline, which called this in MftIndex::from_parsed_records(). The
// direct-to-index path must call it explicitly after all records are
// parsed and parent-child relationships are built.
index.compute_tree_metrics();

Ok(index)
}
}
7 changes: 0 additions & 7 deletions crates/uffs-mft/src/io/readers/parallel/to_index_parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,6 @@ impl ParallelMftReader {
"✅ Parallel parsing IOCP with unified pipeline complete"
);

// Compute tree metrics (size/allocated_size/descendant_count) for all
// directories This is required for parity with the legacy multi-pass
// pipeline, which called this in MftIndex::from_parsed_records(). The
// direct-to-index path must call it explicitly after all records are
// parsed and parent-child relationships are built.
index.compute_tree_metrics();

Ok(index)
}
}
5 changes: 0 additions & 5 deletions crates/uffs-mft/src/reader/index_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,6 @@ impl MftReader {

let mut index = result?;

// Sort directory children first so tree metrics traverse in correct order.
// Tree metrics computation depends on children being in sorted order to
// produce accurate directory sizes and descendant counts.
index.sort_directory_children();

// Compute tree metrics (directory sizes, descendant counts).
// The legacy path gets this from `from_parsed_records()`, but the
// inline path bypasses that, so we must call it explicitly.
Expand Down
3 changes: 0 additions & 3 deletions crates/uffs-mft/src/reader/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,6 @@ impl MftReader {
}
}

// Sort directory children
index.sort_directory_children();

// Compute tree metrics
index.compute_tree_metrics();

Expand Down
Loading