vim-tmux-clipboard icon indicating copy to clipboard operation
vim-tmux-clipboard copied to clipboard

Extreme slowdown when doing global delete.

Open ilAYAli opened this issue 6 years ago • 1 comments

~100x slowdown in file containing 50k lines of text:

without plugin:

time vim -c ':g/PatternToDelete/d' +qa! ~/tmp/largefile.txt

real    0m0.365s
user    0m0.259s
sys     0m0.097s`

with plugin:

time vim -c ':g/PatternToDelete/d' +qa! ~/tmp/largefile.txt

real    0m27.342s
user    0m7.580s
sys     0m19.247s

ilAYAli avatar Mar 26 '18 07:03 ilAYAli

I don't know if it's still relevant, but a workaround to this issue is to send the deletions to the underscore (_) register, like for example...

time vim -c ':g/PatternToDelete/d _' +qa! ~/tmp/largefile.txt

In fact, it is how is recommended on Vim docs.

imjaroiswebdev avatar Jan 11 '23 00:01 imjaroiswebdev