On 5/2/06, John Player <[EMAIL PROTECTED]> wrote:
> > So I guess the help for 'vimgrep' is wrong and the buffers are not
> > kept loaded -- vim just remembers there file names.
>
> I made small experiment that shows that help for 'hide vimgrep'
> is correct.
>
> I created 60MB size file x so that opening time
> is very noticeable. After ':hide vimgrep blablabla x', command
> ':e x' works immediately. Without ':hide vimgrep someting x',
> ':e x' takes noticeable time.
>
> It follows that help for 'hide vimgrep' is correct. It is help for
> unlisted-buffers that needs clarification.
I am afraid that the difference you see is due to the fact that
after 'vimgrep' the file is in the disk cache. Did you compare
':hide vimgrep ...' to ':vimgrep ...' ? I did and in both cases
I did , too. File is in disk cache in both cases. In 1st case,
file opens imemdiately. In 2nd case, it takes time. I suspect
that for unlisted+hidden files, vim keeps swapfile open which is
what helps him open file immediately without using RAM.
Using :!ls I see that indeed in 1st case, .swp file exists,
and in 2nd case, there is no swapfile.
Yakov
'Mem Usage' in Windows Task Manager goes up while vimgrep
is active and then goes down again. The only difference I see
is that in the first case the matched files are in the hidden and
unlisted buffers and in the second case they are just unlisted.
I think Bram can easily clarify this for us if he has time.