Re: vim peculiarity with clearcase
- On Tue, Jun 06, 2000 at 12:32:06PM +0200, Bram Moolenaar wrote:
> It looks like the time is spend in the stat() call, which is the call requiredThanks for that explanation, I hadn't considered the possibility of the file
> to get the inode. Inodes are already used to compare files. Vim also stores
> the absolute path name, because that is what really identifies a file for the
> user (a file could be deleted and created again, giving it a new inode number,
> but it's still the same file from the users point of view). This mostly
> matters for the viminfo feature.
being deleted in the interim.
> Profiling would still be useful, because it often shows surprising things.I haven't tried any profiling yet, but have given your patch a whirl.
> For example, it might be that only the first stat() call for a file is slow,
> and following ones are fast (because of caching). Reducing the number of
> stat() calls for a file won't help then. You could also use ktrace/kdump to
> see how much time is spend in each system call.
It looks like your suspicion about the cache effect was correct, eliminating
the extra stat of each file doesn't seem to help. Strangely enough, it
mostly measured slower on several repetitions, but it was hardly scientific
and the numbers were up and down a lot.
> You could try out the patch below. It halves the number of stat() calls forThanks Bram, I'll let you know if profiling uncovers anything interesting.
> each file added to the buffer list. Let me know if this significantly reduces
> the time to start Vim. For me it's a matter of a few percent (starting with
> about 1500 files takes about three seconds). It could matter a lot more when
> using a network or clearcase.