unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andrzej Leszczynski <andy.leszczynski@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: find-file takes forever on slow network file systems and very deep directories
Date: Wed, 24 Sep 2008 22:02:43 +0300	[thread overview]
Message-ID: <uprmtl63w.fsf@gnu.org> (raw)
In-Reply-To: <50f5aa6a0809231251k37f1f3a3p8a23b1a258a209ee@mail.gmail.com>


[Please keep the emacs-devel list on the list of addressees.]

> Date: Tue, 23 Sep 2008 12:51:23 -0700
> From: "Andrzej Leszczynski" <andy.leszczynski@gmail.com>
> 
> > Thanks.  I cannot spot anything significant: the traces look almost
> > identical, and the code of the suspect function (emulated `stat') is
> > virtually the same, up until the point where the value of
> > w32-get-true-file-attributes is checked (the value of which you said
> > made no difference).
> >
> > Previously you said that with Emacs 22.x, the number of file ops is
> > 889, but I don't see so many ops in the trace you posted to the above
> > URL.  What am I missing?
> >
> > I also don't see the 15-sec delay in the trace: both the trace from
> > Emacs 22.x and from 21.x show about 2-3 seconds between the first
> > syscall and the last.
> >
> > Please help me understand the data.
> >
> 
> the original log embedded in the email contains almost 900 lines and
> take 15 seconds - I guess you need to click on "read more"
> 
> 64      2:45:51 PM
> [...]
> 952     2:46:06 PM
> 
> and it is on emacs run with no .emacs file. Plase doble check if you
> can see that.  w32-get-true-file-attributes does not improve it.

Right, I see the whole 900+ lines now.

It looks like the VC package could be the culprit: there are many
filesystem calls that look for files such as:

  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\.bzr\checkout\
  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\RCS\ 
  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\CVS\Entries
  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\.svn\entries
  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\SCCS\
  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\file.c\_MTN\
  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\{arch}\
  W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\file.c\MCVS\

This greatly enlarges the number of files and directories Emacs needs
to `stat'.

Can you try evaluating the following expression (in Emacs 22.x):

  (remove-hook 'find-file-hook 'vc-find-file-hook)

and then see if the speed of `find-file' increases significantly as a
result?




  parent reply	other threads:[~2008-09-24 19:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23  3:36 find-file takes forever on slow network file systems and very deep directories Andy Leszczynski
2008-09-23 18:00 ` Eli Zaretskii
     [not found]   ` <50f5aa6a0809231114n3890d69bi77ee4c6b70572232@mail.gmail.com>
2008-09-23 19:37     ` Eli Zaretskii
     [not found]       ` <50f5aa6a0809231251k37f1f3a3p8a23b1a258a209ee@mail.gmail.com>
2008-09-24 19:02         ` Eli Zaretskii [this message]
     [not found]           ` <50f5aa6a0809250926y5047e8ei77416eb64fff5b09@mail.gmail.com>
2008-09-26  9:03             ` Eli Zaretskii
2008-09-26 11:37               ` Lennart Borgman (gmail)
2008-09-26 15:05               ` Stefan Monnier
2008-09-26 15:41                 ` Eli Zaretskii
2008-09-26 16:23                   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2008-09-23  3:37 Andy L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uprmtl63w.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=andy.leszczynski@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).