working_copy: add trace scope to tree-writing call

Writing the tree can probably take a bit of time when the working copy
has changed.
This commit is contained in:
Martin von Zweigbergk 2023-08-04 08:25:58 -07:00 committed by Martin von Zweigbergk
parent d06f51a88c
commit 16d00581f6

View File

@ -694,7 +694,9 @@ impl TreeState {
}
});
let has_changes = tree_builder.has_overrides();
trace_span!("write tree").in_scope(|| {
self.tree_id = tree_builder.write_tree();
});
self.watchman_clock = watchman_clock;
Ok(has_changes || fsmonitor_clock_needs_save)
}