From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: moving in the agenda view is slow Date: Sun, 28 Nov 2010 16:32:46 -0500 Message-ID: <3201.1290979966@gamaville.dokosmarshall.org> References: <877hfzbsaj.fsf@pinto.chemeng.ucl.ac.uk> <32269.1290826390@gamaville.dokosmarshall.org> <4CF0E9D0.3010302@diplan.de> <589.1290877232@gamaville.dokosmarshall.org> <4CF14D17.1010905@online.de> <11315.1290885811@gamaville.dokosmarshall.org> <4CF1740B.6030405@online.de> <87pqtp73jw.fsf@ucl.ac.uk> <25801.1290972566@gamaville.dokosmarshall.org> <4CF2B010.9040904@diplan.de> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=38547 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMorr-0004yc-CE for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 16:33:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMorp-0002xG-Et for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 16:33:07 -0500 Received: from vms173005pub.verizon.net ([206.46.173.5]:62265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMorp-0002x6-AE for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 16:33:05 -0500 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 <0LCM00IIY6INAGA0@vms173005.mailsrvcs.net> for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:32:48 -0600 (CST) In-reply-to: Message from Rainer Stengele of "Sun, 28 Nov 2010 20:40:00 +0100." <4CF2B010.9040904@diplan.de> 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: Rainer Stengele Cc: emacs-orgmode@gnu.org, nicholas.dokos@hp.com, Rainer Stengele , Eric S Fraga Rainer Stengele wrote: > I tried with pressing "n" step by step 10 times, so no leaning on the "n" key: > > org-agenda-next-line 10 0.3139999999 0.0314 > next-line 10 0.3139999999 0.0314 > org-detach-overlay 12 0.0 0.0 > org-agenda-post-command-hook 12 0.0 0.0 > org-agenda-do-context-action 10 0.0 0.0 > org-get-at-bol 10 0.0 0.0 > org-unhighlight 12 0.0 0.0 > font-lock-mode 1 0.0 0.0 > font-lock-default-function 1 0.0 0.0 > > > I see no change. Emacs is on Windows XP. > OK - next-line is indeed taking up all the time (but the exact equality and the 0.0 times make me wonder about the clock resolution on this platform and how reliable elp is here), so, unless there is some backdoor connection, these delays have nothing to do with org - it's emacs itself which is slow: 31ms per call is not as slow as it was yesterday, but it's still 25x what I see. Eric, do you encounter this problem on Emacs/Windows XP as well? Has anybody encountered this problem on anything *but* Emacs/Windows XP? Rainer, if you'd like to continue the exercise, maybe the thing to do is to profile functions that next-line calls and get another profile. The only other function that seems likely to take up time is line-move, so you might proceed like this: Set up a minimal emacs so that you don't have to retype everything over and over. Something like the following, where I assume you use org-install to initialize org - you'll also have to change the load-path and the list of org-agenda-files to suit your situation: --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path "~/elisp/org-mode/lisp") (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) (require 'org-install) (require 'org-agenda) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cr" 'elp-results) (elp-instrument-list '(org-agenda-next-line next-line line-move)) (setq org-agenda-files '("~/lib/org/work.org" "~/lib/org/home.org")) (org-agenda-list) (elp-reset-all) --8<---------------cut here---------------end--------------->8--- Save it in a file called minimal.emacs and then say emacs -Q --load minimal.emacs You should get an agenda - press "n" a dozen times, and then C-c r to get the results. You can add more functions to the list above (the next few candidates are line-move-partial, line-move-visual, line-move-1). Assuming that you get consistent results implicating these, I suspect that the thing to do is to post your findings in an emacs forum or open an emacs bug report. I haven't gone back to check your original emails, but is there a particular version of emacs that exhibits this problem? Is there a version that does *not* exhibit it? When exactly did you start noticing this behavior (relative to emacs updates etc)? Thanks, Nick