Skip to content

Commit 11ad426

Browse files
authored
nb diff editor, use textbuffer hash for perf (#227173)
1 parent cfd4de1 commit 11ad426

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export abstract class DiffElementCellViewModelBase extends DiffElementViewModelB
222222
layoutState: CellLayoutState.Uninitialized
223223
};
224224

225-
this.cellFoldingState = modified?.textModel?.getValue() !== original?.textModel?.getValue() ? PropertyFoldingState.Expanded : PropertyFoldingState.Collapsed;
225+
this.cellFoldingState = modified?.getTextBufferHash() !== original?.getTextBufferHash() ? PropertyFoldingState.Expanded : PropertyFoldingState.Collapsed;
226226
this.metadataFoldingState = PropertyFoldingState.Collapsed;
227227
this.outputFoldingState = PropertyFoldingState.Collapsed;
228228

0 commit comments

Comments
 (0)