From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: emacs trying to load too many files at startup Date: Sat, 19 Nov 2005 14:16:06 -0600 (CST) Message-ID: <200511192016.jAJKG6215745@raven.dms.auburn.edu> References: <200511191831.jAJIVJTp026147@scanner2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1132431464 17978 80.91.229.2 (19 Nov 2005 20:17:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2005 20:17:44 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 19 21:17:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EdZ8p-0001bW-KO for ged-emacs-devel@m.gmane.org; Sat, 19 Nov 2005 21:16:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EdZ8p-00082z-1P for ged-emacs-devel@m.gmane.org; Sat, 19 Nov 2005 15:16:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EdZ8g-00082k-A7 for emacs-devel@gnu.org; Sat, 19 Nov 2005 15:16:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EdZ8e-00082Y-S7 for emacs-devel@gnu.org; Sat, 19 Nov 2005 15:16:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EdZ8e-00082V-PF for emacs-devel@gnu.org; Sat, 19 Nov 2005 15:16:44 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EdZ8e-0001Yf-Oi for emacs-devel@gnu.org; Sat, 19 Nov 2005 15:16:44 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id jAJKGiMH012810; Sat, 19 Nov 2005 14:16:44 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id jAJKG6215745; Sat, 19 Nov 2005 14:16:06 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: dann@ics.uci.edu In-reply-to: <200511191831.jAJIVJTp026147@scanner2.ics.uci.edu> (message from Dan Nicolaescu on Sat, 19 Nov 2005 10:31:16 -0800) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Sat, 19 Nov 2005 14:16:44 -0600 (CST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46279 Archived-At: Dan Nicolaescu wrote: 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. Do you really mean that Emacs is trying to load (execute the Lisp expressions in) the file or that it is just trying to open those files? This is seen by looking at stat system calls like: How can you use stat to check that Emacs executed the Lisp expressions in a file? 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" Unless I misunderstand something, the code in locate-file-internal tries to open files, not load them: { Lisp_Object file; int fd = openp (path, filename, suffixes, &file, predicate); if (NILP (predicate) && fd > 0) close (fd); return file; } Sincerely, Luc.