Hi Yakov,

On 4/28/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
I identified which functions are slow and which are fast out of functions
called (load_dummy_buffer() + wipe_dummy_buffer()) pair.

As I wrote earlier this pair of functions is what slows down vimgrep,
not the search. The loop of 1000x (load_dummy_buffer() + wipe_dummy_buffer())
takes 30 seconds per 1000 pairs on my machine (800 MHZ).  These tests
are on empty files, so data size is not a problem. No regexp searching is
performed.

Results:

    check_need_swap() - 50%  major  contributor to slowdown


Maybe the 'noswapfile' option should be set for buffers opened during
the ":vimgrep" operation?

- Yegappan

    ml_open()                - 30%  2nd contributor
    setfname()               - 19%  surprise, surprise

The rest of functions are blazingly fast, take <1% of time.
Fast functions (negligible overhead) include:
- wipe_dummy_buffer()
- buf_copy_options()
- buflist_new()
- aucmd_prepbuf()
- aucmd_restbuf()

I don't have real results for readfile() because I
tested on empty files. But on empty file readfile() works fast.

Yakov

Reply via email to