2022 Developer Survey is open! Take survey.

Questions tagged [performance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

a `nnoremap <buffer><silent>` on .vimrc make the curssor very slow on normal mode

To automate a bit the title creation for rst text I added this to my .vimrc: au FileType rst nnoremap <buffer><silent>h1 yypVr=o au ...
user avatar
1 vote
0 answers
58 views

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 ...
user avatar
  • 157
1 vote
1 answer
488 views

is neovim faster than vim? [closed]

I've read it in some places that neovim is faster than vim, but many of these are a few year old blog posts and I haven't seen any actual comparisons (I'm not even sure how one could be reliable done ...
user avatar
  • 389
0 votes
0 answers
205 views

Neovim freezes when opening a folder in WSL2

When I open neovim with to show a folder it completely freezes. When opening a folder from the command line: nvim . I see a completely black screen When having a file open, navigating to parent ...
user avatar
  • 113
1 vote
2 answers
707 views

Fastest way to compare string with pattern

As far as I know I have these two options to compare a string with a pattern: Using the =~ comparison. Using the matchstr() function. So it looks like this: " with =~ if string =~ "pattern&...
user avatar
  • 388
4 votes
1 answer
159 views

Delete and change key sequences are slow

When I use mapped key sequences which cause an immediate change in the file (e.g. cw, dw, D, C), i have a wait time of roughly 1 second. Other mappings which are just movement (e.g. 3w) or movement ...
user avatar
  • 51
3 votes
0 answers
62 views

Can using too many abbreviations slow down vim?

Recently I started using the iabbr to the best of my abilities. While editing a file I may have sourced as many as 500 abbreviations. I have also noticed that my vim is slowing down recently. The ...
user avatar
1 vote
1 answer
479 views

Vim takes a long time to close over SSH?

While ssh'd into my server, vim hangs for a variable amount of time (about 2 seconds, but can be longer or shorter) when opening and closing. It's worth noting that (to my eyes) the delay is the ...
user avatar
1 vote
0 answers
186 views

How to make code-folding more efficient

I have a ruby file while is about 5K+ lines long. My current setup uses the vim-ruby plugin. With this, I enable code folding with let ruby_fold = 1 This opens my ruby files pre-folded. I can open ...
user avatar
  • 111
2 votes
0 answers
56 views

Is it more efficient to use one function instead of multiple autocommands?

I have a lot of lines with with filetype-specific autocommands defining mappings and abbreviations, which looks like this: augroup vimrc au! ... au FileType blah nnoremap <buffer> aa bb au ...
user avatar
4 votes
0 answers
250 views

MacOS Terminal CPU spike after exiting Vim

I'm using Vim 8.1 from homebrew on MacOs 10.14.6. Whenever I exit vim back to the terminal, the first keypress in the terminal afterward results in a beachball and CPU spike to 100%, with terminal ...
user avatar
1 vote
0 answers
215 views

Simple .vimrc takes a very long time to save

Saving a file with :w takes several seconds for me, and I can't figure out the culprit. This is my .vimrc " Specify a directory for plugins " - For Neovim: ~/.local/share/nvim/plugged " - Avoid using ...
user avatar
0 votes
0 answers
407 views

Why is network latency becomes too long when edit in the sshfs mounted files

I mounted the remote server directory to my local machine mount point with sshfs. Thus I could use my local vim to edit my code, it is much faster than editing with the vim installed to the remote ...
user avatar
0 votes
1 answer
55 views

Are there any performance difference between :edit and :buffer on existing unchanged buffer?

I used to believe that :buffer file is faster than :edit file if file is an existing unchanged buffer. I even created a tiny function for this: function! myvim#open(file) abort let nr = bufnr(a:...
user avatar
  • 5,858
0 votes
1 answer
91 views

Are there any built-in functions to search sorted list?

Are there any built-in functions to search sorted list? Such as binary_search, lower_bound, upper_bound, etc.
user avatar
  • 5,858
0 votes
1 answer
215 views

Vim syntax line matching mechanism

Can someone explain or link to valid explanation information on the syntax highlighting mechanism. In particular I am having having a hard time understanding how rules are applied. Imagine the ...
user avatar
1 vote
1 answer
777 views

Vim slow to open buffers, but not specifically in any sourcing plugin step

I'm using Vim primarily for rails projects, and have found a fairly significant difference in the start up time between a couple of my projects. Here's one project's startuptime log, while opening a ...
user avatar
  • 21
0 votes
1 answer
672 views

sheerun/vim-polyglot ruby seems cause enormous slow down, how to fix or better plugin to use?

When I open a ruby based file (.rb,.erb) in nvim, it causes my whole laptop to slow down! This seems to be caused by sheerun/vim-polyglot that I use for syntax highlighting, specifically the ruby ...
user avatar
  • 229
1 vote
2 answers
616 views

Analyze NeoVim Performance Bottlenecks

My Vim is kinda slow for nearly everything. Opening a file takes five seconds, it flickers when I move up and down NerdTree and sometimes when I switch windows or tabs, it freezes for dozens of ...
user avatar
0 votes
1 answer
88 views

Vim Slowing down when creating .vimrc in $HOME

It's a couple of month that I'm using Vim and I'm happy with it. But working on big files (About 2000 lines) is really annoying. I have some plugins and today I wanted to fix this problem. So I ...
user avatar
1 vote
1 answer
107 views

Switching between tabs takes a few seconds

Using gt and :tabnext I need to wait some time and I experience the same lag when I use :split myfile.txt. However vim myfile.txt from bash opens much faster. My Mac is pretty fast, and I don't have ...
user avatar
0 votes
2 answers
343 views

Strangely slow key bindings

I defined these maps, to yank into system clipboard. noremap <leader>y "*y noremap <leader>Y "*Y noremap <leader>yy "*yy But when I use the first one (<leader>y), I find it ...
user avatar
2 votes
1 answer
268 views

How to track time-expenditure for Vim operations?

Is there a syntime equivalent global command that can track the overall Vim performance? I am having trouble debugging the cause for a set of very-slow file-operations on a Windows machine. Since ...
user avatar
  • 300
3 votes
1 answer
663 views

neovim takes a long time to open files

On profiling, I found that <SNR>101_parse_screen() is taking above 6 seconds. This problem goes away when I comment out the plugin vim-polyglot. This is most evident for vue files. Not sure if ...
user avatar
  • 143
3 votes
2 answers
679 views

Lag from filetype plugin indent on

I'm getting lag in vim when navigating relatively small text files if filetype plugin indent on is uncommented in my vimrc file. My full vimrc file is pasted below. Any help on how I can get it ...
user avatar
0 votes
1 answer
274 views

How to execute multiple command on file open?

Syntax highlighting slowing my vim down. I set syntax sync maxlines=100 syntax sync minlines=100 Now i need to execute :syntax off :syntax on After every new file getting opened to save ...
user avatar
  • 141
12 votes
1 answer
5k views

Why is vim save so slow?

When I save a file in Vim using :update or :w, Vim's entire UI blocks for about a second while it does something mysterious that (as a side effect) writes the buffer being edited to disk. This takes ...
user avatar
  • 2,081
3 votes
1 answer
2k views

Vim slows down with multiple buffers etc

I think noticing a slow redrawing and slow cursor movement on a fastest PC, is one of the popular frustrations with Vim. Here I am as a yet another instance. I have a fresh installation of VIM, with ...
user avatar
10 votes
1 answer
7k views

Most annoying slow-down of a plain-text editor! [closed]

I am a happy user of VIM, except for some bits which I really want vim to improve on. One main issue is frequent slowdown of VIM spoiling the amazingly productive text-editing experience on a fastest ...
user avatar
0 votes
1 answer
81 views

How do I "draw" a buffer from scratch in an efficient manner?

I am writing a small plugin to manage my address book (the actual plugin interfaces with the abook program). I use a special buffer (nofile) and I redraw the entire buffer each time something changes....
user avatar
  • 1,596
2 votes
1 answer
461 views

Is there an autocmd event while triggering the insert mode completion popup menu?

There is a CompleteDone and MenuPopup event. However, I can't find an event for the triggering of the insert mode completion popup menu. So if I want to do something when triggering the completion ...
user avatar
  • 781
5 votes
1 answer
2k views

Folding slow with vimtex

Automatic folding with the vimtex plugin is unbearably slow. Is there anything I can do to speed this up? I tried installing the fastfold plugin but that did nothing I could notice.
user avatar
  • 3,009
3 votes
1 answer
316 views

Slow startup time unrelated to plugins

When I open vim (or gvim) on MacOS X, the window opens immediately, but there is a pause of about a second before the cursor appears. I've profiled my plugins, but their startup times don't account ...
user avatar
  • 643
4 votes
1 answer
544 views

How can I make a slow-ish `system` call in a statusline without corrupting the display?

I wrote a quick snippet of VimL to display, in my statusline, the type of the currently focused Haskell expression It looks like this (click for better quality (as gfy)): I've included the code below,...
user avatar
  • 2,517
2 votes
1 answer
159 views

What is the fastest way to perform this change?

In my codes, I often have to do this kind of text editing: u(:,:,:) = 0._dp v(:,:,:) = 0._dp temp(:,:,:) = 0._dp To: grid%u(0:nx,0:ny,0:nz) = 0._dp grid%v(0:nx,0:ny,0:nz) = 0._dp grid%temp(0:nx,0:...
user avatar
  • 343
5 votes
1 answer
78 views

What are the methods of speeding up parsing of a big file using Ex?

I did recently some performance test where I've created artificially 1GB of random text file by: $ hexdump -C /dev/urandom | rev | head -c1G | pv > file which has around 13mln of lines starting ...
user avatar
  • 16.5k
7 votes
3 answers
2k views

matchpairs makes vim slow

I use set matchpairs+=<:> in my config (to help when editing HTML, for instance), but I just noticed it made vim very slow when editing emails. Is there a way to have this setting without ...
user avatar
  • 395
2 votes
0 answers
50 views

Vim slowdown when browsing with netrw [duplicate]

Sometimes there are several second long slowdowns when browsing Clojure source code in a Git repo via Vim's netrw. My Vim version is 7.4.865. I do have a couple of plugins that must have caused this. ...
user avatar
  • 215
1 vote
1 answer
420 views

matchadd makes vim slow with large files

In my vimrc I have this line : call matchadd('ColorColumn', '\%81v', 100) It colors the 81th column in a subtle grey background so I can track my line length : (see the l and the f) I found out ...
user avatar
  • 15k
13 votes
2 answers
1k views

Detect most resource hungry plugin

I have some plugins installed for vim, I would like to know how can I find out what plugin uses most resources (CPU, RAM) ?
user avatar
5 votes
3 answers
1k views

Improve performance of syntax highlighting in Vim

I have some C++ sources files which are in a few mega-bytes (a few tens thousands lines) to view and edit. The performance looks really bad in Vim. Refersh (<C-l>) or input single char in insert ...
user avatar
  • 812
9 votes
2 answers
333 views

Is there a way to disable the foldexpr during autocomplete?

I've noticed that vim's fold method affects the efficiency of autocomplete, e.g. C-N is slow, and C-X L is hideously slow in medium sized files with relatively expensive foldexprs. I can't see the ...
user avatar
13 votes
3 answers
5k views

Vim slows down over time with syntax on

Is there anything I can do to keep syntax on when using Vim? As soon as I open anything substantial it becomes nearly impossible to edit after a while. Every keypress causes a delay. If I turn syntax ...
user avatar
  • 2,212
19 votes
1 answer
1k views

Do large numbers make vim run slowly?

This seems like a really daft question, but I have a Python file that has a number in it that's a thousand digits long and that file seems to be running very slowly, I'm not sure if there's some kind ...
user avatar
  • 735
24 votes
1 answer
15k views

How to find what slows down Vim? [duplicate]

In some occasions, Vim respond is very slow. Is there a procedure to easily identify what causes the problem?
user avatar
  • 445
12 votes
2 answers
3k views

Cut vim load time

I'm using https://github.com/carlhuda/janus vim distribution and clearly not satisfied with load time. What would be the best way to profile and speed-up vim load time? Also would be interesting to ...
user avatar
  • 387