Skip to main content
added 34 characters in body
Source Link
0x539
  • 197
  • 9

I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater it's breakindent (and to some extent linebreak and scrolloff=2).

I ran some test of the form :Time norm 1000isomething * on a medium-size tex file (350 lines, 3400 words) using thewith empty Time command fromtpope/init.vim-scriptease and these were the results:

  • when breakindent is off this takes less than 2s
  • with breakindent this takes 16s (same if I add so=2)
  • with breakindent and linebreak it's 22s
  • and if I add so=2 it increases further to 27s

For comparison, on vim the times follow a similar pattern but the slowest I get is 5s.

I feel like 27ms is a lot of time to process 10 input characters so it seems like something is wrong here? Is this a bug in neovim? Is this a known issue / is there anything I can do to make this faster?

I'm using Neovim 0.5.1 on Ubuntu.


* using the Time command fromtpope/vim-scriptease

I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater it's breakindent (and to some extent linebreak and scrolloff=2).

I ran some test of the form :Time norm 1000isomething on a medium-size tex file (350 lines, 3400 words) using the Time command fromtpope/vim-scriptease and these were the results:

  • when breakindent is off this takes less than 2s
  • with breakindent this takes 16s (same if I add so=2)
  • with breakindent and linebreak it's 22s
  • and if I add so=2 it increases further to 27s

For comparison, on vim the times follow a similar pattern but the slowest I get is 5s.

I feel like 27ms is a lot of time to process 10 input characters so it seems like something is wrong here? Is this a bug in neovim? Is this a known issue / is there anything I can do to make this faster?

I'm using Neovim 0.5.1 on Ubuntu.

I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater it's breakindent (and to some extent linebreak and scrolloff=2).

I ran some test of the form :Time norm 1000isomething * on a medium-size tex file (350 lines, 3400 words) with empty init.vim and these were the results:

  • when breakindent is off this takes less than 2s
  • with breakindent this takes 16s (same if I add so=2)
  • with breakindent and linebreak it's 22s
  • and if I add so=2 it increases further to 27s

For comparison, on vim the times follow a similar pattern but the slowest I get is 5s.

I feel like 27ms is a lot of time to process 10 input characters so it seems like something is wrong here? Is this a bug in neovim? Is this a known issue / is there anything I can do to make this faster?

I'm using Neovim 0.5.1 on Ubuntu.


* using the Time command fromtpope/vim-scriptease

Source Link
0x539
  • 197
  • 9

neovim: breakindent results in slow insert mode

I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater it's breakindent (and to some extent linebreak and scrolloff=2).

I ran some test of the form :Time norm 1000isomething on a medium-size tex file (350 lines, 3400 words) using the Time command fromtpope/vim-scriptease and these were the results:

  • when breakindent is off this takes less than 2s
  • with breakindent this takes 16s (same if I add so=2)
  • with breakindent and linebreak it's 22s
  • and if I add so=2 it increases further to 27s

For comparison, on vim the times follow a similar pattern but the slowest I get is 5s.

I feel like 27ms is a lot of time to process 10 input characters so it seems like something is wrong here? Is this a bug in neovim? Is this a known issue / is there anything I can do to make this faster?

I'm using Neovim 0.5.1 on Ubuntu.