From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "mitchell_laks" Newsgroups: gmane.emacs.help Subject: Re: faster emacs startup, can I postpone package loading? Date: 2 Jan 2006 18:38:25 -0800 Organization: http://groups.google.com Message-ID: <1136255905.045258.105640@g14g2000cwa.googlegroups.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1136256227 19767 80.91.229.2 (3 Jan 2006 02:43:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Jan 2006 02:43:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 03 03:43:43 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Etc9A-0004QO-8J for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jan 2006 03:43:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EtcAl-0008FG-Fe for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Jan 2006 21:45:15 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 142 Original-NNTP-Posting-Host: 68.237.226.229 Original-X-Trace: posting.google.com 1136255910 27107 127.0.0.1 (3 Jan 2006 02:38:30 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 3 Jan 2006 02:38:30 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (Debian package 1.0.7-1),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=68.237.226.229; posting-account=yrrcewwAAABaVs6jonfP35QR-Ku0nC6T Original-Xref: shelby.stanford.edu gnu.emacs.help:136743 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32362 Archived-At: > > > > First, you'd have track down, where all the loading is happening. > Perhaps this happens in a file like /usr/share/emacs/site-start/site-init.el Thank you! Bingo! The directories /usr/share/emacs and /usr/share/emacs21 are interesting ls /usr/share/emacs/site-lisp/ a2ps cogre ftnchek.el preview-latex aplus-fsf-el csh-mode.el gri-mode.el semantic aribas debian-startup.el kdesdk-scripts speedbar auctex dictionaries-common maxima tramp autoconf ecb mgp yacas cedet-common ede mpqc cedet-contrib eieio noweb-mode.el chktex.el ess octave2.1-emac There is a file debian-startup.el and the directories correspond to the things that emacs loaded during startup. While in /usr/share/emacs21/site-lisp/ ls /usr/share/emacs21/site-lisp/ a2ps cedet-common debian-startup.elc ede gri-mode.elc octave2.1-emacsen speedbar tramp aribas cedet-contrib dictionaries-common eieio maxima preview-latex subdirs.el yacas auctex cogre ecb ess mpqc semantic tex-site.el There, in the ../emacs21/.. directory the file is a compiled file .elc. I had noticed that when I installed on debian a program that has a emacs component, alot of compiling goes on. Also emacs seems to be known as emacs21 on debian, so maybe that is the right location. But I can't read debian-startup.elc but I can read the debian-startup.el in ../emacs/ .. :). Seems to refer to the load sequence ... :( very lispy :( ;; debian-startup.el --- Debian specific emacsen startup code. ;; Copyright (C) 1998 Rob Browning ;; Maintainer: Rob Browning ;;; Commentary: ;; This file contains startup code needed by all the various flavors ;; of Emacs for a Debian system. ;; next follow incomprehensible code then redone code because of comments that "elisp doesn't appear to do tail recursion" which seems unlikely from what I know of modern lisps... ; Rewritten to less elegant -- non recursive version because elisp ;; doesn't seem to handle tail recursion :< (defun debian-unique-strings (strings) "Takes a list of strings and returns the list with *adjacent* duplicates removed." (let ((result '())) (while (consp strings) (if (not (string= (car strings) (car (cdr strings)))) (setq result (cons (car strings) result))) (setq strings (cdr strings))) (nreverse result))) (defun debian-run-directories (&rest dirs) "Load each file of the form XXfilename.el or XXfilename.elc in any of the dirs, where XX must be a number. The files will be run in alphabetical order. If a file appears in more than one of the dirs, then the earlier dir takes precedence, and a .elc file always supercedes a .el file of the same name." etc etc. > Next, you can try Jari Aalto's tiny-load: http://tiny-tools.sourceforge.net/ > It loads packages during idle time. I use it in > http://emacro.sourceforge.net/ Q: Am I going to have to rewrite this thing ?? :((( ?? using tiny-tools? Over my head... Has anyone else smarter than me already done this? I clearly am way over my lisp head! I thought maybe I was doing something really stupid in configuration, such as when I found that emacs was doing reverse dns lookup till it timed out at 10 seconds which I fixed by adjusting /etc/hosts in my machine with no dns. Maybe there just a package or two that is screwed up that is delaying my loading? After all it is only loading 47 or so things. Emacs works fine on another machine with only 16 things to load and 4seconds is a lot longer >> 3* almost nothing.. :). Here in this excerpt of the full *Messages* buffer given above, we see some funny things [2 times] Error loading 55ecb etc. vis: Loading semantic-idle (source)...done [2 times] Loading ede-speedbar (source)...done Loading 52semantic (source)...done Loading 53cedet-contrib (source)...done Loading 53cogre (source)...done Loading 55ecb (source)... "/usr/share/emacs21/site-lisp/cedet-common/" added to `load-path' Error while loading 55ecb Loading semantic-el (source)...done For information about the GNU Project and its goals, type C-h C-p. call-interactively: Beginning of buffer [14 times] call-interactively: End of buffer Dear Bruce your sourceforge site which I am looking at now is amazing. I had no idea what a high level of emacs wizardry exists out in the wild! Thanks Mitchell