From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Slow speed of week and month views Date: Sun, 21 Feb 2010 08:37:24 +0100 Message-ID: References: <877hqdeyw3.fsf@fastmail.fm> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nj6Ne-00041T-8x for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 02:37:30 -0500 Received: from [140.186.70.92] (port=59301 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nj6Nd-00041H-64 for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 02:37:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nj6Nb-00035r-JK for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 02:37:29 -0500 Received: from mail-ew0-f213.google.com ([209.85.219.213]:64909) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nj6Nb-00035j-9f for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 02:37:27 -0500 Received: by ewy5 with SMTP id 5so1762386ewy.32 for ; Sat, 20 Feb 2010 23:37:26 -0800 (PST) In-Reply-To: <877hqdeyw3.fsf@fastmail.fm> 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: Matt Lundin Cc: Org Mode Hi Matt, I am afraid I don't see any major speed improvements that could make =20 this happen. Yes, one could parse all the files once, build a table in memory and =20 get the entries for each day from there - but that comes down to a =20 complete rewrite of the parser, maybe even to switching to an internal =20= representation model for Org-mode. I don't see that happening, I am afraid. - Carsten On Feb 16, 2010, at 8:58 PM, Matt Lundin wrote: > Currently I use org-mode to keep track of todos, projects, deadlines =20= > and > the emacs diary to keep track of appointments. I would prefer to keep > the latter in org-mode, but the slow speed of the weekly and monthly > agenda views makes it difficult to gain a quick calendar overview of =20= > all > upcoming timestamped items. > > Has anyone had success in setting up a *fast* calendar view for > org-mode? I use the following custom command to get a view of > timestamped items only: > > --8<---------------cut here---------------start------------->8--- > ("cc" "Calendar (events)" agenda "" > ((org-agenda-ndays 1) > (org-agenda-time-grid nil) > (org-agenda-prefix-format " %-12:t ") > (org-agenda-include-all-todo nil) > (org-agenda-repeating-timestamp-show-all t) > (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline =20 > 'scheduled)))) > --8<---------------cut here---------------end--------------->8--- > > With 25 agenda files, if I type "v m" (view month) in the agenda =20 > results > for this custom command, it takes over 16 seconds to generate the > monthly calendar.[1] > > I get similar results if I type "v m" in the default agenda view.[2] =20= > As > a point of comparison, I've included the time it takes to generate an > agenda view for a single day on my system.[3] > > As far as I can tell, org-mode scans each agenda file anew for each =20= > day > shown in the weekly or monthly agenda (hence the many invocations of > org-agenda-get-day-entries in the results below), so the time it takes > to generate the agenda is roughly proportional to the number of days =20= > in > the view. > > Does anyone have any tips for speeding up the weekly or monthly agenda > views? I have vague and utterly na=EFve notions of a function that = would > scan each agenda file *once* for timestamps within a given range =20 > rather > than searching the agenda files again for each new day---but such a > function is far beyond my elisp skills. Any help would be greatly > appreciated. > > Thanks! > Matt > > Footnotes: > > [1] Monthly view of custom command with 25 agenda files: > > org-agenda-view-mode-dispatch =20 > 1 15.528815 15.528815 > org-agenda-month-view =20 > 1 15.384877 15.384877 > org-agenda-change-time-span =20 > 1 15.384839 15.384839 > org-agenda-redo =20 > 1 15.383679 15.383679 > org-agenda-list =20 > 1 15.382742 15.382742 > org-agenda-get-day-entries =20 > 700 13.948870999 0.0199269585 > org-agenda-get-scheduled =20 > 700 6.4163719999 0.0091662457 > org-agenda-skip-entry-if =20 > 12871 5.3256909999 0.0004137744 > org-agenda-skip-if =20 > 12871 5.1750260000 0.0004020686 > org-agenda-get-deadlines =20 > 700 4.2478989999 0.0060684271 > org-agenda-get-timestamps =20 > 700 1.7289499999 0.0024699285 > org-agenda-get-sexps =20 > 700 0.6763130000 0.0009661614 > org-agenda-get-blocks =20 > 700 0.6087859999 0.0008696942 > org-agenda-todayp =20 > 1400 0.3336939999 0.0002383528 > org-agenda-skip =20 > 15534 0.0450969999 2.903...e-06 > org-agenda-files =20 > 3 0.016815 0.005605 > org-agenda-cleanup-fancy-diary =20 > 28 0.0062590000 0.0002235357 > org-agenda-mode =20 > 1 0.00606 0.00606 > org-agenda-highlight-todo =20 > 86 0.0041800000 4.860...e-05 > org-agenda-format-date-aligned =20 > 28 0.0033799999 0.0001207142 > org-agenda-new-marker =20 > 136 0.0012809999 9.419...e-06 > org-agenda-mark-clocking-task =20 > 1 0.00121 0.00121 > org-agenda-align-tags =20 > 1 0.000903 0.000903 > org-agenda-find-same-or-today-or-agenda =20 > 1 0.000499 0.000499 > org-agenda-fontify-priorities =20 > 1 0.000394 0.000394 > org-agenda-fix-displayed-tags =20 > 86 0.0003439999 3.999...e-06 > org-agenda-add-time-grid-maybe =20 > 23 0.000236 1.026...e-05 > org-agenda-set-mode-name =20 > 2 6.2e-05 3.1e-05 > org-agenda-compute-time-span =20 > 1 3.8e-05 3.8e-05 > org-agenda-mark-header-line =20 > 1 3.5e-05 3.5e-05 > org-agenda-post-command-hook =20 > 2 1.6e-05 8e-06 > org-agenda-reset-markers =20 > 1 1e-05 1e-05 > org-agenda-ndays-to-span =20 > 2 6e-06 3e-06 > org-agenda-check-type =20 > 1 5e-06 5e-06 > > [2] Elp results for monthly agenda view: > > org-agenda-view-mode-dispatch =20 > 1 14.143243 14.143243 > org-agenda-month-view =20 > 1 13.974747 13.974747 > org-agenda-change-time-span =20 > 1 13.974703 13.974703 > org-agenda-redo =20 > 1 13.972615 13.972615 > org-agenda-list =20 > 1 13.97065 13.97065 > org-agenda-get-day-entries =20 > 700 12.608783999 0.0180125485 > org-agenda-get-scheduled =20 > 700 5.9895430000 0.0085564900 > org-agenda-get-deadlines =20 > 700 3.8111570000 0.0054445100 > org-agenda-get-timestamps =20 > 700 1.2642759999 0.0018061085 > org-agenda-get-sexps =20 > 700 0.6626510000 0.0009466442 > org-agenda-skip =20 > 15534 0.6255180000 4.026...e-05 > org-agenda-get-blocks =20 > 700 0.6051640000 0.0008645200 > org-agenda-todayp =20 > 1400 0.326468 0.0002331914 > org-agenda-align-tags =20 > 1 0.023695 0.023695 > org-agenda-highlight-todo =20 > 178 0.0217819999 0.0001223707 > org-agenda-files =20 > 3 0.0175449999 0.0058483333 > org-agenda-cleanup-fancy-diary =20 > 28 0.006159 0.0002199642 > org-agenda-mode =20 > 1 0.006109 0.006109 > org-agenda-mark-clocking-task =20 > 1 0.005423 0.005423 > org-agenda-format-date-aligned =20 > 28 0.003358 0.0001199285 > org-agenda-new-marker =20 > 314 0.0026219999 8.350...e-06 > org-agenda-add-time-grid-maybe =20 > 27 0.0011129999 4.122...e-05 > org-agenda-fontify-priorities =20 > 1 0.000879 0.000879 > org-agenda-fix-displayed-tags =20 > 178 0.0008699999 4.887...e-06 > org-agenda-find-same-or-today-or-agenda =20 > 1 0.000471 0.000471 > org-agenda-deadline-face =20 > 27 0.0002540000 9.407...e-06 > org-agenda-reset-markers =20 > 1 8.5e-05 8.5e-05 > org-agenda-set-mode-name =20 > 2 5.7e-05 2.85e-05 > org-agenda-mark-header-line =20 > 1 3.6e-05 3.6e-05 > org-agenda-compute-time-span =20 > 1 3.3e-05 3.3e-05 > org-agenda-post-command-hook =20 > 2 2.2e-05 1.1e-05 > org-agenda-ndays-to-span =20 > 2 7e-06 3.5e-06 > org-agenda-check-type =20 > 1 5e-06 5e-06 > > [3] Agenda view for single day: > > org-agenda-list =20 > 1 1.765911 1.765911 > org-agenda-get-day-entries =20 > 25 1.075021 0.04300084 > org-agenda-get-scheduled =20 > 25 0.8153739999 0.0326149599 > org-agenda-get-deadlines =20 > 25 0.1540369999 0.0061614799 > org-agenda-get-timestamps =20 > 25 0.0491 0.001964 > org-agenda-get-sexps =20 > 25 0.023261 0.00093044 > org-agenda-skip =20 > 555 0.0225499999 4.063...e-05 > org-agenda-get-blocks =20 > 25 0.021848 0.0008739199 > org-agenda-files =20 > 3 0.0159939999 0.0053313333 > org-agenda-align-tags =20 > 1 0.013129 0.013129 > org-agenda-highlight-todo =20 > 59 0.0100849999 0.0001709322 > org-agenda-mode =20 > 1 0.007312 0.007312 > org-agenda-todayp =20 > 50 0.0030340000 6.068e-05 > org-agenda-mark-clocking-task =20 > 1 0.002379 0.002379 > org-agenda-new-marker =20 > 112 0.0008930000 7.973...e-06 > org-agenda-add-time-grid-maybe =20 > 1 0.000831 0.000831 > org-agenda-fontify-priorities =20 > 1 0.000378 0.000378 > org-agenda-fix-displayed-tags =20 > 59 0.0002479999 4.203...e-06 > org-agenda-cleanup-fancy-diary =20 > 1 0.00022 0.00022 > org-agenda-deadline-face =20 > 18 0.000182 1.011...e-05 > org-agenda-format-date-aligned =20 > 1 0.000117 0.000117 > org-agenda-reset-markers =20 > 1 8.5e-05 8.5e-05 > org-agenda-mark-header-line =20 > 1 3.7e-05 3.7e-05 > org-agenda-set-mode-name =20 > 1 2.7e-05 2.7e-05 > org-agenda-post-command-hook =20 > 1 1.8e-05 1.8e-05 > org-agenda-ndays-to-span =20 > 2 7e-06 3.5e-06 > > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten