From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: How to load recentf only after opening/saving a file for thefirsttime? Date: Fri, 7 Sep 2012 08:48:07 -0700 Message-ID: References: <80txvarlnv.fsf@somewhere.org> <80pq5xswwt.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347032914 8783 80.91.229.3 (7 Sep 2012 15:48:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2012 15:48:34 +0000 (UTC) To: "'Sebastien Vauban'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 07 17:48:35 2012 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 1TA0nF-0003Tx-Fm for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Sep 2012 17:48:29 +0200 Original-Received: from localhost ([::1]:50728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA0nC-0001xG-4m for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Sep 2012 11:48:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA0n7-0001x0-2A for help-gnu-emacs@gnu.org; Fri, 07 Sep 2012 11:48:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TA0n1-0007VS-8p for help-gnu-emacs@gnu.org; Fri, 07 Sep 2012 11:48:20 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:35557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA0n1-0007VK-2H for help-gnu-emacs@gnu.org; Fri, 07 Sep 2012 11:48:15 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q87FmCAc002956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Sep 2012 15:48:13 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q87FmC7U017457 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Sep 2012 15:48:12 GMT Original-Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q87FmCQq032351; Fri, 7 Sep 2012 10:48:12 -0500 Original-Received: from dradamslap1 (/10.159.216.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 07 Sep 2012 08:48:11 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <80pq5xswwt.fsf@somewhere.org> Thread-Index: Ac2NCXyzhtyBz7A7QLKQf5eewCfU3AABDWpA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 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:86686 Archived-At: > The fact is that Emacs (RC 24.2 on Windows) takes around 25 > seconds to load my (huge, yes) .emacs file (378 KB, ~10 KLOC > from which a third is white lines, and another one is comment lines). > Loading Org mode takes another minute or so, with 50 agenda files. > > That's really too much. That's why I'm trying to refactor my > .emacs file to try to see what takes time. I'm trying to > autoload as much as possible, and to delay the `require' calls I understand. And that's a good approach. As you know, you can also use `eval-after-load' to avoid doing some stuff unnecessarily. As with any performance problem, start by attacking the biggest hogs. It sounds like your 50 Org-mode agenda files constitute 2/3 of your performance problem at the moment, so perhaps start there. Do you really need to load all of your Org agenda files? Do they need to be so big/slow? Does Org mode provide any constructs that might alleviate some of this penalty? I don't have answers for you, sorry. Except for this obvious one: try starting Emacs less often and keeping your Emacs sessions open longer. Oh, and of course byte-compile the code you load. (You mention whitespace lines and commented lines, but those are irrelevant for byte-compiled code.) And maybe try profiling code for the worst parts of your problem. Perhaps you've hit a bug or two, or perhaps you've found an opportunity for some library to be improved wrt load performance.