From d3b1f7f042da9834815d51afc95ae1eb5fcdee28 Mon Sep 17 00:00:00 2001 From: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com> Date: Fri, 23 Jan 2026 03:18:04 -0500 Subject: [PATCH] git: Fix graph view slow initial loading times (#47453) The git graph view was missing a `cx.notify` when it loaded commits from the data layer, causing the graph to seem unresponsive until a render was triggered by something else. Release Notes: - N/A --- crates/git_graph/src/git_graph.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/git_graph/src/git_graph.rs b/crates/git_graph/src/git_graph.rs index 5fda56c08680629a2f4c220b87864dfec2d1d066..fc1db52cd1b66192255e096d6ec927cee6927e85 100644 --- a/crates/git_graph/src/git_graph.rs +++ b/crates/git_graph/src/git_graph.rs @@ -620,6 +620,9 @@ impl GitGraph { if let Some(repository) = project.read(cx).active_repository(cx) { repository.update(cx, |repository, cx| { + // This won't overlap with loading commits from the repository because + // we either have all commits or commits loaded in chunks and loading commits + // from the repository event is always adding the last chunk of commits. let commits = repository.graph_data(log_source.clone(), log_order, 0..usize::MAX, cx); graph.add_commits(commits); @@ -688,6 +691,8 @@ impl GitGraph { } _ => {} } + + cx.notify(); } fn render_badge(&self, name: &SharedString, accent_color: gpui::Hsla) -> impl IntoElement {