help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: faster emacs startup, can I postpone package loading?


From: mitchell_laks
Subject: Re: faster emacs startup, can I postpone package loading?
Date: 2 Jan 2006 18:38:25 -0800
User-agent: G2/0.2

> >
> > 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 <rlb@defaultvalue.org>

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



reply via email to

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