diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 1f7056711637421ab142a7ce43ba5839380b4fd6..35c560d6a57b937141494f5537e7fc4a9572d4b6 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -3210,9 +3210,9 @@ impl BufferGitState { unstaged_diff.as_ref().zip(new_unstaged_diff.clone()) { let task = unstaged_diff.update(cx, |diff, cx| { - if language_changed { - diff.language_changed(language.clone(), language_registry.clone(), cx); - } + // For git index buffer we skip assigning the language as we do not really need to perform any syntax highlighting on + // it. As a result, by skipping it we are potentially shaving off a lot of RSS plus we get a snappier feel for large diff + // view multibuffers. diff.set_snapshot(new_unstaged_diff, &buffer, cx) }); Some(task.await)