Skip to content

Do not include cursorline in the default configuration since it incurs a significant CPU hit#887

Open
mmikitka wants to merge 1 commit intospf13:3.0from
mmikitka:cursorline_perf
Open

Do not include cursorline in the default configuration since it incurs a significant CPU hit#887
mmikitka wants to merge 1 commit intospf13:3.0from
mmikitka:cursorline_perf

Conversation

@mmikitka
Copy link
Copy Markdown
Contributor

Prior to this commit, I would often observe Vim using 100% CPU while scrolling through a basic PHP or CSS file with the common, "j" and "k" motion commands. After profiling Vim under various configurations, I isolated the cause to "set cursorline" in .vimrc. Upon disabling cursorline, I was able to navigate the same files at ~10% CPU utilization.

":help cursorline" shows the following

Highlight the screen line of the cursor with CursorLine |hl-CursorLine|. Useful to easily spot the cursor. Will make screen redrawing slower. When Visual mode is active the highlighting isn't used to make it easier to see the selected text.

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.

1 participant