emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs trying to load too many files at startup


From: Eli Zaretskii
Subject: Re: emacs trying to load too many files at startup
Date: Sat, 19 Nov 2005 22:07:48 +0200

> Cc: address@hidden
> From: Dan Nicolaescu <address@hidden>
> Date: Sat, 19 Nov 2005 11:49:57 -0800
> 
>   > 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.

Of course you can put a breakpoint on stat64, since it's a normal
function that issues a syscall, not the syscall itself.  If you tried
and failed, it's probably because glibc plays all kinds of redirection
and weak-alias games.  Try "rbreak stat64", and you will see the name
of the _real_ function that issues the syscall.  But that's an aside,
it sounds like you found the culprit.

> 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))

Do we know that this code alone is responsible for those 2000 extra
calls to stat64?  Is it possible that there's some other code besides
Fexpand_file_name that causes some of those calls?

> 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? 

I don't know.  Anyone?

I'm guessing that this is converting non-absolute file names in
loaddefs.el into absolute file names.




reply via email to

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