Skip to content

diff: slow fold update with many windows - #21782

Closed
glepnir wants to merge 1 commit into
vim:masterfrom
glepnir:slow_diff_update
Closed

glepnir wants to merge 1 commit into
vim:masterfrom
glepnir:slow_diff_update

Conversation

@glepnir

@glepnir glepnir commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Problem: diff_infold() checks the tab page of the window for every
line, which is slow with many windows (Test_crash1_2 times out
after 9.2.1295).
Solution: Find the tab page once in foldUpdateIEMS() and pass it to
diff_infold().

AI assistance

  • AI involvement is disclosed in the commit message
  • No AI was used

Checklist

  • The commit message follows the Problem/Solution form above
  • Signed-off-by: trailer is present (git commit -s), recommended but not required

Tests

  • Tests were added
  • Existing tests cover the change
  • The change cannot be tested (explain below)

Documentation

  • Documentation under runtime/doc/ was updated
  • No documentation update is needed

Anything reviewers should know

Comment thread src/fold.c Resolved
Problem:  diff_infold() checks the tab page of the window for every
          line, which is slow with many windows (Test_crash1_2 times out
          after 9.2.1295).
Solution: Find the tab page once in foldUpdateIEMS() and pass it to
          diff_infold().
akasakariko added a commit to akasakariko/vim that referenced this pull request Nov 7, 2026
Problem:  Current upstream makes Test_crash1_2 time out in several CI
          configurations, preventing complete coverage uploads.
Solution: Integrate the diff fold performance fix from PR vim#21782,
          preserving its original commit and author (akasakariko).

related: vim#21664
related: vim#21782
Signed-off-by: akasakariko <[email protected]>
@chrisbra

chrisbra commented Nov 8, 2026

Copy link
Copy Markdown
Member

thanks

@chrisbra chrisbra closed this in 34b846a Nov 8, 2026
h-east added a commit to h-east/viai that referenced this pull request Nov 8, 2026
Problem:  diff_infold() checks the tab page of the window for every
          line, which is slow with many windows (Test_crash1_2 times out
          after v9.2.1295).
Solution: Find the tab page once in foldUpdateIEMS() and pass it to
          diff_infold() (glephunter).

vim/vim@34b846a

related: vim/vim#21678
closes:  vim/vim#21782

Co-authored-by: glepnir <[email protected]>
Signed-off-by: Hirohito Higashi <[email protected]>
h-east added a commit to h-east/viai that referenced this pull request Nov 8, 2026
Problem:  diff_infold() checks the tab page of the window for every
          line, which is slow with many windows (Test_crash1_2 times out
          after v9.2.1295).
Solution: Find the tab page once in foldUpdateIEMS() and pass it to
          diff_infold() (glephunter).

vim/vim@34b846a

related: vim/vim#21678
closes:  vim/vim#21782
closes: viai-editor#211

Co-authored-by: glepnir <[email protected]>
Signed-off-by: Hirohito Higashi <[email protected]>
h-east added a commit to viai-editor/viai that referenced this pull request Nov 8, 2026
Problem:  diff_infold() checks the tab page of the window for every
          line, which is slow with many windows (Test_crash1_2 times out
          after v9.2.1295).
Solution: Find the tab page once in foldUpdateIEMS() and pass it to
          diff_infold() (glephunter).

vim/vim@34b846a

related: vim/vim#21678
closes:  vim/vim#21782
closes: #211

Co-authored-by: glepnir <[email protected]>
Signed-off-by: Hirohito Higashi <[email protected]>
zeertzjq added a commit to neovim/neovim that referenced this pull request Nov 9, 2026
Problem:  diff_infold() checks the tab page of the window for every
          line, which is slow with many windows (Test_crash1_2 times out
          after v9.2.1295).
Solution: Find the tab page once in foldUpdateIEMS() and pass it to
          diff_infold() (glephunter).

related: vim/vim#21678
closes:  vim/vim#21782

vim/vim@34b846a

Co-authored-by: glepnir <[email protected]>
akasakariko added a commit to akasakariko/vim that referenced this pull request Nov 12, 2026
Problem:  This branch's comparison still includes the diff fold performance
          fix now integrated in upstream master.
Solution: Merge current master to remove the redundant dependency from
          the PR diff while retaining its original history (Asuka).

related: vim#21664
related: vim#21782
Signed-off-by: Asuka <[email protected]>
Rational-Idiot pushed a commit to Rational-Idiot/neovim that referenced this pull request Nov 13, 2026
…42756)

Problem:  diff_infold() checks the tab page of the window for every
          line, which is slow with many windows (Test_crash1_2 times out
          after v9.2.1295).
Solution: Find the tab page once in foldUpdateIEMS() and pass it to
          diff_infold() (glephunter).

related: vim/vim#21678
closes:  vim/vim#21782

vim/vim@34b846a

Co-authored-by: glepnir <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants