mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
Add some debug logging to understand hangs in the git store's compute_snapshot (#57317)
Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
This commit is contained in:
parent
0042fb5850
commit
251456cf20
1 changed files with 6 additions and 0 deletions
|
|
@ -9144,6 +9144,8 @@ async fn compute_snapshot(
|
|||
backend: Arc<dyn GitRepository>,
|
||||
cx: &mut AsyncApp,
|
||||
) -> Result<RepositorySnapshot> {
|
||||
log::debug!("starting compute snapshot");
|
||||
|
||||
let (id, work_directory_abs_path, prev_snapshot) = this.update(cx, |this, _| {
|
||||
this.paths_needing_status_update.clear();
|
||||
(
|
||||
|
|
@ -9175,6 +9177,7 @@ async fn compute_snapshot(
|
|||
}
|
||||
})
|
||||
.await?;
|
||||
log::debug!("fetched branches, head commit, worktrees");
|
||||
let branch = branches.iter().find(|branch| branch.is_head).cloned();
|
||||
let branch_list: Arc<[Branch]> = branches.into();
|
||||
|
||||
|
|
@ -9198,6 +9201,8 @@ async fn compute_snapshot(
|
|||
})
|
||||
.await?;
|
||||
|
||||
log::debug!("fetched remotes");
|
||||
|
||||
let snapshot = this.update(cx, |this, cx| {
|
||||
let head_changed =
|
||||
branch != this.snapshot.branch || head_commit != this.snapshot.head_commit;
|
||||
|
|
@ -9257,6 +9262,7 @@ async fn compute_snapshot(
|
|||
}
|
||||
})
|
||||
.await?;
|
||||
log::debug!("fetched statuses, diff stats, stash entries");
|
||||
|
||||
let diff_stat_map: HashMap<&RepoPath, DiffStat> =
|
||||
diff_stats.entries.iter().map(|(p, s)| (p, *s)).collect();
|
||||
|
|
|
|||
Loading…
Reference in a new issue