[vim/vim] Speed up text property redraw in win_line() (PR #19880)

2 views
Skip to first unread message

mattn

unread,
5:13 AM (16 hours ago) 5:13 AM
to vim/vim, Subscribed

This reduces redraw overhead for text properties in win_line() by avoiding repeated sorting when the active property set has not changed, using stack storage for small property/index arrays, and precomputing whether trailing virtual text still follows.

The effect is small for simple cases and grows with the number of active text properties on a line. In redraw-heavy cases with many overlapping properties, this cuts a noticeable amount of time from screen updates.

Case vim_master this branch Improvement
1 prop/line 0.181s median 0.185s median -2.2%
8 props/line 0.308s median 0.270s median 12.3%
32 props/line 1.475s median 0.955s median 35.3%

A longer redraw benchmark with heavily overlapping text properties showed:

Benchmark vim_master avg this branch avg Improvement
overlap redraw long 1.517s 1.016s 33.0%

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19880

Commit Summary

  • 30377dd Speed up textprop redraw in win_line()

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19880@github.com>

Reply all
Reply to author
Forward
0 new messages