From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Kanis Newsgroups: gmane.emacs.help Subject: Re: How to Reduce Emacs Load Time Date: Sun, 31 Aug 2008 11:39:00 +0200 Message-ID: <8763phh6bv.fsf@kanis.fr> References: <18aba2b0-4fc7-4588-b69f-d9f46b264b03@q26g2000prq.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220178200 12324 80.91.229.12 (31 Aug 2008 10:23:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 Aug 2008 10:23:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 31 12:24:13 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KZk6P-0000DI-A9 for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Aug 2008 12:24:13 +0200 Original-Received: from localhost ([127.0.0.1]:44624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZk5P-00034u-Uu for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Aug 2008 06:23:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZjxe-00024B-40 for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 06:15:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZjxb-00023h-UI for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 06:15:08 -0400 Original-Received: from [199.232.76.173] (port=43213 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZjxb-00023K-BE for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 06:15:07 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:39834 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KZjxa-0004au-Rs for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 06:15:07 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KZjxW-0004Tj-O4 for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 10:15:02 +0000 Original-Received: from pir44-1-89-87-99-142.dsl.club-internet.fr ([89.87.99.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 31 Aug 2008 10:15:02 +0000 Original-Received: from expire-by-2008-09-05 by pir44-1-89-87-99-142.dsl.club-internet.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 31 Aug 2008 10:15:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pir44-1-89-87-99-142.dsl.club-internet.fr Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAPFBMVEUAAABIPTwvJSaTgX38 +PQRCAqxnp339/92Z2bLvMAFAAT///8bEBLp5eny8uvd1NNcUFQVABUIAAj///carFalAAAB10lE QVRIie2U25brIAiGUaLxGIx9/3cd0GmnjXTW7sW+G9q1kiAfEPkNwMeWP7I/4Mcq3W9i/ReA7DmJ WCD8Angz01GBGYcdAOXmeBR6ASzYkbixt/A1yFyFRAtmW4HDclzkQgAdypYjXztXoJGgrsBuONDU zUriRNxY4p+vpzybYwWkdYAWp8R8m9dg4N7ZFbhZaQFmABT3IlHUXlpaWm34UtSABiuR0nAZdQ4N FGJ6vD64a3i/P/eqAqi9wWBa1oAqA0hXIAlS1Aqjo977pa+RIijAZpSOoJgxj7KtAAFY34oJLAmU DXPBO2hbjBF/enoC/CjMmbwLQ6lBBD/kG6Erg+M9oryz5XjsMhOfd/GzgyD5FeCQyCFC8N/IdPf9 nkuTRhvbvY8acjbBCS9QLWoFznlyyCZAHVtzzrSVVzQAeQx2+ucZkwkjYpB5OloBmqchBGwnFIwU nuSnqZWV8dCFPXKk+RGYk0cF4J6cY0akQzFAx6MBK6lzmlPVEmvDDTlxX65ETMWMAumdWmU70pSe 8ceRySQnjjQ+Phrwrb/OWvIR0WNxU9yU3wAiHng6pvOF8JbfA/nmx74/EIP0sr4AbAeRx9CaCUT1 dlnUgF/tD/hfwIf2BQZnSFIDGmgZAAAAAElFTkSuQmCC User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:B0QSCuDUvuooyko/XNww6FAQWAI= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:57144 Archived-At: formido wrote: > Emacs takes like 10 seconds to load. It's a lot faster if I don't load > all my packages. What strategies could I use to get my load time down? > Emacs itself is made up of tons of elisp files and it doesn't take > forever to load, so I don't see why I should be forced to endure long > load times just because I add third party packages. If I do, 'require > package', I'm at the mercy of the package maker's initialization > process, right? Hi, I use late binding, I load the package when I start using it. For example for ido mode: (defun ivan-ido-file () "Find file, late bind ido." (interactive) (ivan-ido-late-bind) (ido-find-file)) (defun ivan-ido-late-bind () (unless ido-mode (require 'uniquify) (ido-mode 'both))) I then bind C-x C-f to ivan-ido-file, it will load ido the first time I need it. This makes my emacs faster to start. The full code for ido is here https://kanis.fr/svn/trunk/wk/lisp/emacs.d/ivan-ido.el I use it for bbdb and gnus as well, it's on the same path. -- Ivan http://kanis.fr Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Albert Einstein