emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs 23.0 is much slower starting than Emacs 22.3


From: Stefan Monnier
Subject: Re: Emacs 23.0 is much slower starting than Emacs 22.3
Date: Sat, 25 Oct 2008 11:19:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> Setting vc-handled-backends to nil should indeed stop VC from doing
>> those directory walks.  So now I don't understand why the walks done by
>> VC are so much cheaper than the ones done by locate-dominating-file.
>> Could it be that all the files you opened were under CVS control (so
>> the VC search stops before having to walk up the directories)?

> Eventually found vc-find-root. So - it versus locate-dominating-file ?
> While they're doing a fairly similar job, they do look to me like they're
> implemented importantly differently -locate-dominating-file takes a regex
> and passes it to directory-files for each directory. AFAICS directory-files
> scans the whole directory each time through for the match. OTOH,
> vc-find-root just tests if /path/to/directory/witness exists.  The former is
> rather slower and (I think) consier. I'm not sure that there's any real
> performance problem with directory-files itself for what it actually does,
> though maybe it could be made faster. Maybe not worthwhile though - easier
> to rewrite locate-dominating-file to not use it as below...

Thanks for you investigative work.  locate-dominating-file used a regexp
for searches for multiple files (e.g. I intended to merge the N calls to
vc-find-root into a single call to locate-dominating-file), but from
your measurements, it seems that unless we're searching for an
open-ended set of files we're better off with multiple calls to
vc-find-root, so I think we should indeed change locate-dominating-file
to use a fixed name.  This will also have the advantage that we should
be able to use it directory for VC and hence get rid of vc-find-root.

I've installed a change which should do just that.


        Stefan




reply via email to

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