ok/jj
1
0
Fork 0
forked from mirrors/jj

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();
self.tree_id = tree_builder.write_tree();
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)
}