From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Speeding up agenda display Date: Sat, 2 Jan 2010 08:50:58 +0100 Message-ID: <938BEB0E-6A34-44B5-9164-CE26105E3EEB@gmail.com> References: <4D8BBF51-8F5A-47E4-99F4-603E349BDD99@gmail.com> <8CAD865A-01AA-49B7-AEE5-1FF088865282@gmail.com> <4CA37E79-ADED-4127-A358-218B6B522F05@iu.edu> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQyld-0003BA-MI for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 02:51:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQylZ-0003Aa-SR for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 02:51:21 -0500 Received: from [199.232.76.173] (port=59337 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQylZ-0003AX-Mu for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 02:51:17 -0500 Received: from mx20.gnu.org ([199.232.41.8]:7523) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQylY-0005pD-U5 for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 02:51:17 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQylX-0007yl-HB for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 02:51:15 -0500 Received: by ewy24 with SMTP id 24so16309325ewy.26 for ; Fri, 01 Jan 2010 23:51:11 -0800 (PST) In-Reply-To: <4CA37E79-ADED-4127-A358-218B6B522F05@iu.edu> 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: "Andrew J. Korty" Cc: Org Mode On Dec 31, 2009, at 6:46 PM, Andrew J. Korty wrote: > Shaved off half a second. So that's something! You can shave off another .5 seconds by pressing the selection key faster - Org spends 0.46 seconds to wait for your keypress :-) - Carsten > > ajk > > org-agenda > 1 1.534166 1.534166 > org-let > 1 1.070332 1.070332 > org-agenda-list > 1 1.070318 1.070318 > org-agenda-get-day-entries > 1 1.040049 1.040049 > ajk/org-agenda-skip-if-not-due-soon > 416 0.5035600000 0.0012104807 > org-agenda-get-scheduled > 1 0.478835 0.478835 > org-agenda-get-restriction-and-command > 1 0.463795 0.463795 > ajk/org-agenda-skip-if-due-soon > 416 0.3743920000 0.0008999807 > org-entry-get > 425 0.366792 0.00086304 > org-entry-properties > 416 0.3582450000 0.0008611658 > org-agenda-skip-entry-if > 416 0.3090569999 0.0007429254 > org-agenda-skip-if > 416 0.3077089999 0.0007396850 > org-agenda-get-timestamps > 1 0.302895 0.302895 > org-agenda-get-deadlines > 1 0.254305 0.254305 > org-back-to-heading > 991 0.1790740000 0.0001807003 > ajk/org-skip-position > 419 0.1317510000 0.0003144415 > org-at-date-range-p > 101 0.0377359999 0.0003736237 > org-prepare-agenda > 1 0.022929 0.022929 > org-prepare-agenda-buffers > 1 0.022543 0.022543 > org-agenda-skip > 416 0.0190569999 4.581...e-05 > org-refresh-category-properties > 1 0.011837 0.011837 > org-get-tags-at > 3 0.009567 0.0031890000 > org-up-heading-safe > 11 0.0094379999 0.0008579999 > org-deadline-close > 177 0.0081639999 4.612...e-05 > org-finalize-agenda > 1 0.005829 0.005829 > org-agenda-dim-blocked-tasks > 1 0.005662 0.005662 > org-get-property-block > 9 0.005145 0.0005716666 > org-days-to-time > 177 0.0044610000 2.520...e-05 > org-get-todo-state > 119 0.004413 3.708...e-05 > org-format-agenda-item > 3 0.003384 0.0011279999 > org-get-effort > 3 0.0031450000 0.0010483333 > org-block-todo-from-children-or-siblings-or-parent > 3 0.0028770000 0.0009590000 > org-time-string-to-time > 177 0.0021530000 1.216...e-05 > org-agenda-get-blocks > 1 0.002113 0.002113 > org-entry-is-done-p > 114 0.0020669999 1.813...e-05 > org-agenda-get-sexps > 1 0.001715 0.001715 > ajk/org-agenda-skip-if-tagged-for-home > 11 0.001621 0.0001473636 > org-parse-time-string > 184 0.0012810000 6.961...e-06 > org-get-priority > 3 0.0009730000 0.0003243333 > org-fit-window-to-buffer > 1 0.000604 0.000604 > org-get-category > 420 0.0004230000 1.007...e-06 > org-get-wdays > 180 0.0004199999 2.333...e-06 > org-trim > 113 0.0003679999 3.256...e-06 > org-finalize-agenda-entries > 1 0.000337 0.000337 > org-get-tags > 11 0.000304 2.763...e-05 > org-time-string-to-absolute > 7 0.0002929999 4.185...e-05 > org-agenda-mode > 1 0.000236 0.000236 > org-agenda-highlight-todo > 3 0.000225 7.5e-05 > org-agenda-files > 3 0.000218 7.266...e-05 > org-get-tags-string > 11 0.0001759999 1.599...e-05 > org-switch-to-buffer-other-window > 1 0.000172 0.000172 > org-closest-date > 4 0.000158 3.95e-05 > org-outline-level > 25 0.0001409999 5.639...e-06 > org-uniquify > 5 0.0001150000 2.300...e-05 > org-check-agenda-file > 2 9.5e-05 4.75e-05 > org-date-to-gregorian > 8 8.2e-05 1.025e-05 > org-get-agenda-file-buffer > 2 8.2e-05 4.1e-05 > org-split-string > 16 7.5e-05 4.6875e-06 > org-find-base-buffer-visiting > 2 7.2e-05 3.6e-05 > org-activate-bracket-links > 2 6.8e-05 3.4e-05 > org-days-to-iso-week > 3 5.699...e-05 1.899...e-05 > org-agenda-format-date-aligned > 1 5.5e-05 5.5e-05 > org-compile-prefix-format > 1 5.3e-05 5.3e-05 > org-add-props > 11 4.9e-05 4.454...e-06 > org-agenda-fix-displayed-tags > 3 4.5e-05 1.5e-05 > org-agenda-new-marker > 6 4.4e-05 7.333...e-06 > org-entries-lessp > 2 3.999...e-05 1.999...e-05 > org-agenda-align-tags > 1 3.6e-05 3.6e-05 > org-agenda-todayp > 2 3.1e-05 1.55e-05 > org-on-heading-p > 11 3.000...e-05 2.727...e-06 > org-agenda-reset-markers > 1 2.1e-05 2.1e-05 > org-agenda-fontify-priorities > 1 2.1e-05 2.1e-05 > org-hh:mm-string-to-minutes > 2 1.499...e-05 7.499...e-06 > org-get-at-bol > 5 1.2e-05 2.4e-06 > org-agenda-add-time-grid-maybe > 1 1.1e-05 1.1e-05 > org-get-time-of-day > 1 1.1e-05 1.1e-05 > org-agenda-mark-header-line > 1 9e-06 9e-06 > org-agenda-deadline-face > 3 8e-06 2.666...e-06 > org-remove-uniherited-tags > 5 8e-06 1.6e-06 > org-agenda-set-mode-name > 1 7e-06 7e-06 > org-remove-flyspell-overlays-in > 1 7e-06 7e-06 > org-add-hook > 2 6e-06 3e-06 > org-float-time > 6 5.999...e-06 1e-06 > org-agenda-mark-clocking-task > 1 5e-06 5e-06 > org-overlays-in > 3 4.999...e-06 1.666...e-06 > org-downcase-keep-props > 3 4e-06 1.333...e-06 > org-get-todo-face > 3 4e-06 1.333...e-06 > org-region-active-p > 1 3e-06 3e-06 > org-file-menu-entry > 1 3e-06 3e-06 > org-unhighlight > 1 3e-06 3e-06 > org-set-sorting-strategy > 1 2e-06 2e-06 > org-add-prop-inherited > 2 2e-06 1e-06 > org-before-change-function > 1 2e-06 2e-06 > org-fit-agenda-window > 1 1e-06 1e-06 > org-agenda-ndays-to-span > 2 1e-06 5e-07 > org-font-lock-add-tag-faces > 1 1e-06 1e-06 > > On Dec 31, 2009, at 02:45 , Carsten Dominik wrote: > >> Hi Andrew, thanks! >> >> The only thing I see now is this: >> >> 1. Get the latest development version. A week or two ago I made >> an optimization that should speed up >> >> (org-entry-get nil "DEADLINE") >> >> quite a bit. >> >> Let's see if that does help enough. >> >> - Carsten >> >> On Dec 30, 2009, at 8:40 PM, Andrew J. Korty wrote: >> >>> On Dec 30, 2009, at 14:20 , Carsten Dominik wrote: >>> >>>> could you please also instrument your ajk/ functions for profiling >>>> and >>>> repeat the experiment? And show the code of all these functions, >>>> not >>>> only some (I am missing for example `ajk/org-agenda-skip-if-due- >>>> soon'.... >>> >>> Yes to both -- see below for corrected listings of code and >>> profiling results. >>> >>>> Also: >>>> >>>> - Are you using property inheritance? >>>> - Are you relying on tag inheritance to check for @yard and @home? >>> >>> No to both. >>> >>>> - Are you using the latest version of Org-mode? >>> >>> I'm using 6.33. >>> >>> Btw, the single org file from which the agenda is generated contains >>> 323 headlines in the TODO state and 12,227 lines total. >>> >>> Thanks, >>> ajk >>> >>> (setq org-agenda-custom-commands >>> '(("o" "Due at Office" agenda "" >>> ((org-agenda-skip-function >>> '(or (org-agenda-skip-entry-if '(notdeadline)) >>> (ajk/org-agenda-skip-if-not-due-soon) >>> (ajk/org-agenda-skip-if-tagged-for-home))))))) >>> >>> (defun ajk/org-skip-position () >>> (or (save-excursion >>> (outline-next-heading) >>> (point)) >>> (point-max))) >>> >>> (defun ajk/org-agenda-skip-if-due-soon () >>> (and (let ((time (org-entry-get nil "DEADLINE"))) ; not due or not >>> due soon >>> (and time >>> (org-deadline-close time))) >>> (ajk/org-skip-position))) >>> >>> (defun ajk/org-agenda-skip-if-not-due-soon () >>> (unless (ajk/org-agenda-skip-if-due-soon) >>> (ajk/org-skip-position))) >>> >>> (defun ajk/org-agenda-skip-if-tagged-for-home () >>> (org-back-to-heading t) >>> (let ((tags (org-get-tags))) >>> (if (or (member "@home" tags) >>> (member "@yard" tags)) >>> (ajk/org-skip-position)))) >>> >>> org-agenda >>> 1 1.997575 1.997575 >>> org-let >>> 1 1.3057590000 1.3057590000 >>> org-agenda-list >>> 1 1.305747 1.305747 >>> org-agenda-get-day-entries >>> 1 1.279215 1.279215 >>> ajk/org-agenda-skip-if-not-due-soon >>> 416 1.0349629999 0.0024878918 >>> ajk/org-agenda-skip-if-due-soon >>> 416 0.9751669999 0.0023441514 >>> org-entry-get >>> 422 0.9655619999 0.0022880616 >>> org-entry-properties >>> 416 0.9618369999 0.0023121081 >>> org-get-tags-at >>> 418 0.6982910000 0.0016705526 >>> org-agenda-get-restriction-and-command >>> 1 0.691773 0.691773 >>> org-up-heading-safe >>> 1055 0.6649149999 0.0006302511 >>> org-agenda-get-scheduled >>> 1 0.6341589999 0.6341589999 >>> org-agenda-get-deadlines >>> 1 0.5069330000 0.5069330000 >>> org-agenda-skip-entry-if >>> 416 0.1385249999 0.0003329927 >>> org-agenda-skip-if >>> 416 0.1372300000 0.0003298798 >>> org-agenda-get-timestamps >>> 1 0.134207 0.134207 >>> org-back-to-heading >>> 2439 0.0887650000 3.639...e-05 >>> ajk/org-skip-position >>> 419 0.0583169999 0.0001391813 >>> org-prepare-agenda >>> 1 0.023446 0.023446 >>> org-prepare-agenda-buffers >>> 1 0.022988 0.022988 >>> org-refresh-category-properties >>> 1 0.012406 0.012406 >>> org-outline-level >>> 1696 0.0118750000 7.001...e-06 >>> org-at-date-range-p >>> 101 0.009216 9.124...e-05 >>> org-agenda-skip >>> 416 0.0086059999 2.068...e-05 >>> org-deadline-close >>> 178 0.0084609999 4.753...e-05 >>> org-get-tags-string >>> 424 0.0053519999 1.262...e-05 >>> org-days-to-time >>> 178 0.0047240000 2.653...e-05 >>> org-time-string-to-time >>> 178 0.0022689999 1.274...e-05 >>> org-get-todo-state >>> 116 0.0022219999 1.915...e-05 >>> org-agenda-get-blocks >>> 1 0.002071 0.002071 >>> org-entry-is-done-p >>> 113 0.0019850000 1.756...e-05 >>> org-agenda-get-sexps >>> 1 0.001713 0.001713 >>> org-finalize-agenda >>> 1 0.001653 0.001653 >>> org-split-string >>> 633 0.0015850000 2.503...e-06 >>> org-agenda-dim-blocked-tasks >>> 1 0.001572 0.001572 >>> org-parse-time-string >>> 183 0.0013499999 7.377...e-06 >>> org-on-heading-p >>> 424 0.0012929999 3.049...e-06 >>> org-get-property-block >>> 6 0.0011920000 0.0001986666 >>> org-fit-window-to-buffer >>> 1 0.000942 0.000942 >>> org-block-todo-from-children-or-siblings-or-parent >>> 2 0.000905 0.0004525 >>> org-format-agenda-item >>> 2 0.0008860000 0.0004430000 >>> org-remove-uniherited-tags >>> 627 0.0007880000 1.256...e-06 >>> org-get-effort >>> 2 0.00074 0.00037 >>> ajk/org-agenda-skip-if-tagged-for-home >>> 8 0.000539 6.7375e-05 >>> org-get-wdays >>> 180 0.0004700000 2.611...e-06 >>> org-get-category >>> 419 0.0004360000 1.040...e-06 >>> org-trim >>> 111 0.0003769999 3.396...e-06 >>> org-agenda-files >>> 3 0.000291 9.700...e-05 >>> org-agenda-mode >>> 1 0.000287 0.000287 >>> org-add-prop-inherited >>> 250 0.0002820000 1.128...e-06 >>> org-time-string-to-absolute >>> 5 0.000258 5.159...e-05 >>> org-finalize-agenda-entries >>> 1 0.000233 0.000233 >>> org-switch-to-buffer-other-window >>> 1 0.000217 0.000217 >>> org-get-priority >>> 2 0.000194 9.7e-05 >>> org-get-tags >>> 8 0.000168 2.1e-05 >>> org-agenda-highlight-todo >>> 2 0.0001590000 7.950...e-05 >>> org-closest-date >>> 4 0.000157 3.925e-05 >>> org-uniquify >>> 5 0.0001439999 2.879...e-05 >>> org-check-agenda-file >>> 2 0.000105 5.25e-05 >>> org-get-agenda-file-buffer >>> 2 9.6e-05 4.8e-05 >>> org-find-base-buffer-visiting >>> 2 8.5e-05 4.25e-05 >>> org-date-to-gregorian >>> 8 8.1e-05 1.0125e-05 >>> org-compile-prefix-format >>> 1 6.8e-05 6.8e-05 >>> org-days-to-iso-week >>> 3 5.7e-05 1.9e-05 >>> org-agenda-format-date-aligned >>> 1 4.8e-05 4.8e-05 >>> org-add-props >>> 8 3.5e-05 4.375e-06 >>> org-agenda-new-marker >>> 4 3.5e-05 8.75e-06 >>> org-agenda-todayp >>> 2 3.3e-05 1.65e-05 >>> org-agenda-add-inherited-tags >>> 2 2.999...e-05 1.499...e-05 >>> org-agenda-reset-markers >>> 1 2.7e-05 2.7e-05 >>> org-agenda-align-tags >>> 1 2.7e-05 2.7e-05 >>> org-entries-lessp >>> 1 2.4e-05 2.4e-05 >>> org-agenda-fontify-priorities >>> 1 1.4e-05 1.4e-05 >>> org-agenda-mark-header-line >>> 1 1.1e-05 1.1e-05 >>> org-activate-bracket-links >>> 1 9e-06 9e-06 >>> org-get-at-bol >>> 4 9e-06 2.25e-06 >>> org-hh:mm-string-to-minutes >>> 1 8e-06 8e-06 >>> org-agenda-add-time-grid-maybe >>> 1 7e-06 7e-06 >>> org-agenda-deadline-face >>> 2 7e-06 3.5e-06 >>> org-add-hook >>> 2 7e-06 3.5e-06 >>> org-agenda-set-mode-name >>> 1 6e-06 6e-06 >>> org-float-time >>> 4 6e-06 1.5e-06 >>> org-agenda-mark-clocking-task >>> 1 5e-06 5e-06 >>> org-overlays-in >>> 3 4.999...e-06 1.666...e-06 >>> org-downcase-keep-props >>> 2 4e-06 2e-06 >>> org-unhighlight >>> 1 4e-06 4e-06 >>> org-region-active-p >>> 1 3e-06 3e-06 >>> org-file-menu-entry >>> 1 3e-06 3e-06 >>> org-get-todo-face >>> 2 3e-06 1.5e-06 >>> org-set-sorting-strategy >>> 1 2e-06 2e-06 >>> org-agenda-ndays-to-span >>> 2 2e-06 1e-06 >>> org-font-lock-add-tag-faces >>> 1 2e-06 2e-06 >>> org-fit-agenda-window >>> 1 1e-06 1e-06 >>> org-before-change-function >>> 1 1e-06 1e-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 >> >> >> > > > > _______________________________________________ > 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