From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glyn Millington Newsgroups: gmane.emacs.help Subject: Re: Speeding up Emacs load time Date: Mon, 15 Jul 2013 07:20:35 +0100 Organization: Utterly lacking Message-ID: <87hafwuyx8.fsf@nowhere.org> References: Reply-To: glyn.millington@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373869872 30720 80.91.229.3 (15 Jul 2013 06:31:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jul 2013 06:31:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 15 08:31:15 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UycJS-0000QI-HD for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jul 2013 08:31:10 +0200 Original-Received: from localhost ([::1]:46587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UycJS-0008UL-46 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jul 2013 02:31:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UycJ8-0008PP-Dn for help-gnu-emacs@gnu.org; Mon, 15 Jul 2013 02:30:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UycJ3-0005PW-W0 for help-gnu-emacs@gnu.org; Mon, 15 Jul 2013 02:30:50 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:60110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UycJ3-0005PH-JU for help-gnu-emacs@gnu.org; Mon, 15 Jul 2013 02:30:45 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UycJ1-0000C5-SR for help-gnu-emacs@gnu.org; Mon, 15 Jul 2013 08:30:43 +0200 Original-Received: from cust25-dsl91-135-3.idnet.net ([91.135.3.25]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jul 2013 08:30:43 +0200 Original-Received: from glyn.millington by cust25-dsl91-135-3.idnet.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jul 2013 08:30:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cust25-dsl91-135-3.idnet.net X-Liturgical-Date: Memorial: Saint Bonaventure, bishop and doctor of the Church, A.D. 2013 X-Shakespeare: "Every good servant does not all commands." -- Cymbeline, V.1 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:7QQ0IeBJSmFhMBI6HT7pY+cE6QQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92130 Archived-At: Andrew Pennebaker writes: Post re-ordered - moved your latest to the right place :-) > On Jul 14, 2013 9:05 PM, "Ken Goldman" > wrote: > >> On 6/26/2013 1:04 PM, J. David Boyd wrote: >> >>> Andrew Pennebaker writes: >>> >>>> Could someone help me cut down the load time while maintaining the >>>> same behavior? >>>> >>> Wow. My emacs takes almost 2 minutes to load up. But I only start >>> it in the morning, and stop it at night before I go home. >>> >> My emacs runs for months at a time. Load time is buried in boot >> time. >> Use the client server model. I use gnuserv. > This does not address my problem. I can run many programs for long > spans of time, but what I'm after is faster load time. > In any case, Emacs frequently crashes in Mac and Windows, so that's > not an option. One popular technique is not to load packages until you need 'em. That means fewer 'requires' in your .emacs/init.el file and more autoloads. See tips 3-5 here! http://a-nickels-worth.blogspot.co.uk/2007/11/effective-emacs.html The key function is eval-after-load Two people who have written wrappers to eval-after-load The Milky Postman http://milkbox.net/note/single-file-master-emacs-configuration/ Look for the 'after' macro and how he uses it. Much more complex is John Wiegley's 'use-package', available through elpa https://github.com/jwiegley/use-package Good luck ....... Glyn