From: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org
Subject: Re: emacs trying to load too many files at startup
Date: Sat, 19 Nov 2005 11:49:57 -0800 [thread overview]
Message-ID: <200511191950.jAJJo0Tp029512@scanner2.ics.uci.edu> (raw)
In-Reply-To: <uu0e8fo96.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Nov 2005 21:09:41 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
> > From: Dan Nicolaescu <dann@ics.uci.edu>
> > 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
next prev parent reply other threads:[~2005-11-19 19:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-19 18:31 emacs trying to load too many files at startup Dan Nicolaescu
2005-11-19 19:09 ` Eli Zaretskii
2005-11-19 19:49 ` Dan Nicolaescu [this message]
2005-11-19 20:07 ` Eli Zaretskii
2005-11-19 20:17 ` Dan Nicolaescu
2005-11-20 23:23 ` Richard M. Stallman
2005-11-19 20:16 ` Luc Teirlinck
2005-11-19 20:19 ` Dan Nicolaescu
2005-11-20 17:12 ` Stefan Monnier
2005-11-21 8:09 ` Richard M. Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200511191950.jAJJo0Tp029512@scanner2.ics.uci.edu \
--to=dann@ics.uci.edu \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.