Loading ...
Sorry, an error occurred while loading the content.

Re: vim peculiarity with clearcase

Expand Messages
  • Paul_A
    ... Thanks for that explanation, I hadn t considered the possibility of the file being deleted in the interim. ... I haven t tried any profiling yet, but have
    Message 1 of 6 , Jun 6, 2000
    • 0 Attachment
      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 required
      > 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.

      Thanks for that explanation, I hadn't considered the possibility of the file
      being deleted in the interim.

      > Profiling would still be useful, because it often shows surprising things.
      > 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.

      I haven't tried any profiling yet, but have given your patch a whirl.
      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 for
      > 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.

      Thanks Bram, I'll let you know if profiling uncovers anything interesting.

      --
      Paul Ackersviller
    Your message has been successfully submitted and would be delivered to recipients shortly.