Re: functions that take much time in load_dummy_buffer() [vimgrep]
- Yakov Lerner wrote:
> > If creating the swap file takes so much time, something strange isPerhaps Cygwin libraries do something strange. It's such a mix of Unix
> > happening. Are you on a network filesystem perhaps? What system is
> > this anyway?
and MS-Windows that you never know what it's doing. You might be better
off with MSVC or MingW.
> But why swapfile is needed for read-only grepping ? Is itEverything is possible, but the main thing is that this works reliably
> possible not to create swapfile for dummy buf ? To set readonly
> and nonmodifiable maybe, for dummy buffer ?
(thus also for big files that don't fit in memory) and I don't have to
add lots of extra code. Autocommands are very unpredictable, that is a
major concern with making exceptions.
> > Testing with empty files may give a wrong impression. Try somethingI don't think trying to benchmark something that won't happen in real
> > like:
> > :vimgrep notaword $VIMRUNTIME/**/*.vim
> > The .vim files are relatively small.
> The remove the regexp code from the picture (search can easily be
> benchmarked separately from file loading), I used artificial temporary
> patch which allows to run N times, see attached patch and script.
life is useful. You never know how the results can be translated to
> > I tried doing a bit of profiling, but it gets confused by the loops andThat requires a lot of recompiling and testing...
> > reports bogus results.
> Instead of profiling, I commented out lines in load_dummy_buffer() and
> rerun timing. This is how I saw how different parts affect executiorn
Lawmakers made it obligatory for everybody to take at least one bath
each week -- on Saturday night.
[real standing law in Vermont, United States of America]
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///