[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs trying to load too many files at startup
From: |
Dan Nicolaescu |
Subject: |
Re: emacs trying to load too many files at startup |
Date: |
Sat, 19 Nov 2005 11:49:57 -0800 |
Eli Zaretskii <address@hidden> writes:
> > From: Dan Nicolaescu <address@hidden>
> > Date: Sat, 19 Nov 2005 10:31:16 -0800
> >
> > The /tmp/emacs.strace file shows that emacs is trying to load at
> > startup a lot of files that are dumped anyway so there should be no
> > reason to load them at startups.
> >
> > This is seen by looking at stat system calls like:
> >
stat64("/home/dann/packages/emacs-CVS/share/emacs/22.0.50/site-lisp/replace.elc",
0xbf8c767c)
> >
> > Other files loaded: abbrev, textmodes/fill, emacs-lisp/lisp-mode, etc, etc
> >
> > There are about 2400 stat syscalls during the startup.
> > emacs-21.4 does about 230 stat64 syscalls...
> >
> > When running from the local disk this is unlikely to cause a problem,
> > but it might be a problem when using a slow NFS server...
> >
> > Does anyone know what is going on?
>
> The easiest and the most accurate way of answering that is to put a
> breakpoint in stat64, and then do a bt each time the breakpoint
> triggers.
stat64 is a syscall, so you cannot set a breakpoint on it. I set a
breakpoint on Fexpand_file_name instead and that lead to:
(gdb) xbacktrace
"locate-file-internal"
"locate-file"
"mapcar"
"command-line"
"normal-top-level"
And that seems to indicate this code:
;; Convert preloaded file names to absolute.
(setq load-history
(mapcar (lambda (elt)
(if (and (stringp (car elt))
(not (file-name-absolute-p (car elt))))
(cons (locate-file (car elt) load-path
load-suffixes)
(cdr elt))
elt))
load-history))
This is the change that introduced the above code:
revision 1.381
date: 2005/10/21 17:20:45; author: rms; state: Exp; lines: +11 -0
(command-line): Convert library names in `load-history' to absolute file names.
The question is: should anything be done about this?
--dan
Re: emacs trying to load too many files at startup, Luc Teirlinck, 2005/11/19
Re: emacs trying to load too many files at startup, Stefan Monnier, 2005/11/20