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

> Date: Thu, 25 Sep 2008 09:26:59 -0700
> From: "Andrzej Leszczynski" <andy.leszczynski@gmail.com>
> 
> > 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?
> >
> 
> I had the same thought - see in the USENET thread - but I did not have
> the clue how to disable it. Now it  loads the file much faster,
> although it still _stats_ all the dirs up to the root (drive C:)

Does anyone have any thoughts on how to avoid such a significant
performance hit (15 sec for a simple `find-file') on Samba volumes, as
opposed to just 2 seconds in Emacs 21.x, which didn't automatically
have `vc-find-file-hook' on the `find-file-hook' list?

If there's no good cure, we should at least provide a user option to
avoid putting `vc-find-file-hook' on `find-file-hook', or maybe allow
finer-grain control of it, like per filesystem.

Thoughts?




  parent reply	other threads:[~2008-09-26  9:03 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
     [not found]           ` <50f5aa6a0809250926y5047e8ei77416eb64fff5b09@mail.gmail.com>
2008-09-26  9:03             ` Eli Zaretskii [this message]
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=uljxfl1o7.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).