Tuesday, November 14, 2017

Re: Vim surprisingly slow?

On Sun, Nov 12, 2017 at 10:21 PM, Tim Chase <vim@tim.thechases.com> wrote:
> If I change the "exec" to an "echo", it's as fast as I expect.
>
> Any idea what might be making the exec so slow?

It's vim writing to disk that makes it slow. I ran it on SSD it's
fast, on a spindle disk it's slow. I use fatrace[1] to see the file
create/write/close operations done by vim. So vim is writing to the
file for each line that matches the pattern.

$ sudo fatrace
...
vim(4719): WO /home/nazri/disk/20150425.txt
vim(4719): W /home/nazri/disk/20150425.txt
vim(4719): CW /home/nazri/disk/20150425.txt
vim(4719): CW /home/nazri/disk/20150425.txt
vim(4719): CO /home/nazri/disk
vim(4719): WO /home/nazri/disk/20150425.txt
vim(4719): W /home/nazri/disk/20150425.txt
vim(4719): CW /home/nazri/disk/20150425.txt
vim(4719): CW /home/nazri/disk/20150425.tx
...

nazri

[1] https://launchpad.net/fatrace https://github.com/truncs/fatrace

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: