Skip to content

Commit aaa4598

Browse files
committed
Fixes #4661 composer rendering slow with large file diffs
1 parent 90546a9 commit aaa4598

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1111
- Fixes Git diff of a renamed file is shown as a new file ([#4246](https://github.com/gitkraken/vscode-gitlens/issues/4246))
1212
- Fixes typos ([#4345](https://github.com/gitkraken/vscode-gitlens/issues/4345) — thanks to [PR #4346](https://github.com/gitkraken/vscode-gitlens/pull/4346) by Noritaka Kobayashi ([@noritaka1166](https://github.com/noritaka1166)))
1313
- Fixes issue where the _Commit Graph_ hover would not hide when going from the hover to the graph background (not another row)
14+
- Fixes _Commit Composer_ rendering performance when working changes contain large file diffs ([#4661](https://github.com/gitkraken/vscode-gitlens/issues/4661))
1415

1516
## [17.5.1] - 2025-09-24
1617

src/webviews/apps/plus/composer/components/diff/diff-file.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ export class GlDiffFile extends LitElement {
123123
.join('\n');
124124

125125
this.diffText = diffLines.trim();
126-
const parsedDiff = parseDiff(this.diffText);
126+
const parsedDiff = parseDiff(this.diffText, {
127+
diffMaxChanges: 10000,
128+
});
127129
this.parsedDiff = parsedDiff;
128130
const lineCount = this.diffFile?.blocks.reduce((p, c) => p + 1 + c.lines.length, 0) ?? -1;
129131
this.style.setProperty('--d2h-intrinsic-line-count', lineCount > -1 ? `${lineCount}` : '50');

0 commit comments

Comments
 (0)