Problem
When the preference "Fold unchanged regions, keeping a few lines of context around each change" is enabled and many unchanged regions are folded, editing the document becomes very slow. User input is barely registered or has a significant delay, making the editor practically unusable in this state.
Steps to Reproduce
- Enable Unified Diff in Preferences > Compare/Patch.
- Enable "Fold unchanged regions, keeping a few lines of context around each change".
- Open a file with many changes so that a large number of unchanged regions are folded.
- Start typing / editing in the editor.
Expected Behavior
Editing performance should be unaffected by the number of folded regions. User input should be processed at normal speed regardless of the folding state.
Actual Behavior
The editor becomes very slow. Keystrokes are delayed or dropped, making editing effectively impossible when many regions are folded.
Notes
This issue requires root-cause analysis. The folding mechanism likely triggers expensive recalculations (e.g. annotation recomputation, projection updates, or diff recalculation) on every document change, which does not scale with large numbers of folded regions.
Problem
When the preference "Fold unchanged regions, keeping a few lines of context around each change" is enabled and many unchanged regions are folded, editing the document becomes very slow. User input is barely registered or has a significant delay, making the editor practically unusable in this state.
Steps to Reproduce
Expected Behavior
Editing performance should be unaffected by the number of folded regions. User input should be processed at normal speed regardless of the folding state.
Actual Behavior
The editor becomes very slow. Keystrokes are delayed or dropped, making editing effectively impossible when many regions are folded.
Notes
This issue requires root-cause analysis. The folding mechanism likely triggers expensive recalculations (e.g. annotation recomputation, projection updates, or diff recalculation) on every document change, which does not scale with large numbers of folded regions.