From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Re: Org file rendering/manipulation too slow Date: Sun, 05 Sep 2010 22:07:22 -0400 Message-ID: <7013.1283738842@gamaville.dokosmarshall.org> References: <871vak112n.fsf@altern.org> <87iq3o86s4.fsf@gnu.org> <19549.21434.7688.225279@gazelle-32.local> <87zkwamkn9.fsf@norang.ca> <19578.37551.295920.461789@gazelle-32.local> <25942.1283221918@gamaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=38058 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OsR7d-0005dg-79 for emacs-orgmode@gnu.org; Sun, 05 Sep 2010 22:07:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OsR7X-0004sa-JL for emacs-orgmode@gnu.org; Sun, 05 Sep 2010 22:07:48 -0400 Received: from vms173005pub.verizon.net ([206.46.173.5]:54989) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OsR7X-0004sR-G6 for emacs-orgmode@gnu.org; Sun, 05 Sep 2010 22:07:43 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L8A004P5Z8IT7H3@vms173005.mailsrvcs.net> for emacs-orgmode@gnu.org; Sun, 05 Sep 2010 21:07:31 -0500 (CDT) In-reply-to: Message from Marcelo de Moraes Serpa of "Sun\, 05 Sep 2010 19\:45\:53 CDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcelo de Moraes Serpa Cc: Bernt Hansen , nicholas.dokos@hp.com, Org Mode , Bastien Marcelo de Moraes Serpa wrote: > Hi Nick, >=20 > The output of elp-results is attached. I have opened a big org file I > have, and navigated through the items a bit. >=20 > Thanks, >=20 > Marcelo. >=20 > On Mon, Aug 30, 2010 at 9:31 PM, Nick Dokos wrote: > > Marcelo de Moraes Serpa wrote: > > > >> Yeah, thanks. It is really a shame that emacs will run orgmode this > >> slow on OSX. OSX is now my platform of choice, and emacs my editor of > >> choice. I keep a big reference org file with tons of tons of notes, > >> but, even with the settings you suggested (thanks for that!) it is > >> still very slow. I'm considering switching my notes to evernote, > >> although I would really like to just stay with emacs+orgmode, but it's > >> just too slow as of now :( > >> > > > > Please take a profile: Just do > > > > =C2=A0 =C2=A0 =C2=A0 M-x elp-instrument-package org > > > > then run the slow command, then M-x elp-results and post the output to > > the list. It might not be enough to solve your problem but it would at > > least provide *some* information. > > > > Thanks, > > Nick > > OK - thanks for doing that. Given the stats: ,---- | org-cycle 3 = 0.050032 0.0166773333 | org-cycle-internal-local 3 = 0.04951 0.0165033333 | org-optimize-window-after-visibility-change 2 = 0.0380670000 0.0190335000 | ... `---- it seems clear that org-mode is not the culprit and, at 0.05s, any improvements made there are going to be completely swamped by the real time sink (maybe the display code if I understand things correctly.) Also, presumably you are not complaining about the 50ms delay: that would be almost unnoticeable. How long does it take for emacs to show you the file? Some questions: How much memory do you have on your system? How much memory does emacs consume? Is your disk active when emacs is taking forever? On linux, I get the first with sed 1q /proc/meminfo and the second with ps awlx | grep emacs and look at the RSS field (field 8 in the output); e.g. ,---- | $ ps awlx | grep emacs | 0 9772 11777 1 20 0 51284 32660 - R ? 1:02 /usr= /local/bin/emacs `---- shows me that emacs is consuming roughly 32Mb. I have 1Gb of memory on the machine, so that's a comfortable fit (about 1/30 of available memory: leaves just enough space for X and firefox :-) ). If your numbers are closer, then maybe that's a problem: in particular, if your disk goes wild while emacs is trying to do its thing, you are probably swapping heavily and your performance will *really* be in the toilet. The only solution is to buy more memory (assuming your machine can handle it.) I should say that I know very little about Darwin, so all of the above is pure speculation. Parts of it may be applicable: you'd need to check with an OSX expert for more details. If there are no problems of the sort described above, I would ask in an emacs forum about the performance of the display engine on Darwin: do other people see the slowness? It would show up even without org (although org make the situation marginally worse to be sure.) Given the font-lock setting that Bernt dug up, it seems likely that if memory is not the problem, the display engine is. HTH, Nick