emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file takes forever on slow network file systems and very deep d


From: Lennart Borgman (gmail)
Subject: Re: find-file takes forever on slow network file systems and very deep directories
Date: Fri, 26 Sep 2008 13:37:04 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Eli Zaretskii wrote:
>> Date: Thu, 25 Sep 2008 09:26:59 -0700
>> From: "Andrzej Leszczynski" <address@hidden>
>>
>>> 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?


I took a quick look at `vc-find-file-hook' and it looks like it is
caching the `backend' property for the file name. Should not the check
for the vc backend happen only once for each dir (like dir1, dir2 etc)
above?

Perhaps there is a bug somewhere so that the caching is not used?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]