Questions tagged [performance]
The performance tag has no usage guidance.
44
questions
-1
votes
0answers
25 views
Why is my vim slower when using keybindigs? [duplicate]
I have a little issue with vim, I've set a keybinding to close buffers nmap <leader>q :bdelete<CR> But I don't understand why, when I use that keybinding it takes a few milliseconds to do ...
4
votes
1answer
46 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 ...
0
votes
0answers
29 views
Much slower startup on Windows than WSL2
I finally got around to refreshing my vim setup and adding plugins and such. As a result, my startup time has gotten much worse. What's strange though is that it only seems to be an issue on Windows. ...
0
votes
0answers
72 views
vim open very slow when the current directory is on nfs mounted remote disk
I mounted a remote dist to my local directory via mount -t nfs and then I tried to create file and write file to it
touch file.txt
echo dddd > file.txt
The latency is not much time, and not ...
3
votes
0answers
59 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 ...
0
votes
1answer
121 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 ...
1
vote
0answers
63 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 ...
2
votes
0answers
53 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 ...
3
votes
0answers
156 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 ...
1
vote
0answers
154 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 ...
0
votes
0answers
222 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 ...
0
votes
1answer
48 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:...
0
votes
1answer
77 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.
0
votes
1answer
147 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 ...
1
vote
1answer
379 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 ...
0
votes
1answer
573 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 ...
2
votes
0answers
416 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 ...
0
votes
1answer
77 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 ...
1
vote
1answer
45 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 ...
0
votes
2answers
217 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 ...
2
votes
1answer
194 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 ...
3
votes
1answer
438 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 ...
3
votes
2answers
620 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 ...
0
votes
1answer
259 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 ...
9
votes
1answer
4k 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 ...
3
votes
1answer
1k 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 ...
5
votes
1answer
5k 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 ...
0
votes
1answer
71 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....
2
votes
1answer
398 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 ...
4
votes
1answer
1k 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.
3
votes
1answer
243 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 ...
3
votes
1answer
428 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,...
2
votes
1answer
148 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:...
5
votes
1answer
59 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 ...
5
votes
3answers
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 ...
2
votes
0answers
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. ...
1
vote
1answer
362 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 ...
13
votes
2answers
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) ?
5
votes
3answers
925 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 ...
9
votes
2answers
268 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 ...
11
votes
3answers
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 ...
18
votes
1answer
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 ...
22
votes
1answer
10k 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?
11
votes
2answers
2k 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 ...