From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andrew J. Korty" Subject: Re: Speeding up agenda display Date: Wed, 30 Dec 2009 14:40:46 -0500 Message-ID: References: <4D8BBF51-8F5A-47E4-99F4-603E349BDD99@gmail.com> Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQ4Ph-0004Si-O3 for emacs-orgmode@gnu.org; Wed, 30 Dec 2009 14:40:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQ4Pb-0004Qj-R6 for emacs-orgmode@gnu.org; Wed, 30 Dec 2009 14:40:56 -0500 Received: from [199.232.76.173] (port=56559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ4Pb-0004Qb-Lt for emacs-orgmode@gnu.org; Wed, 30 Dec 2009 14:40:51 -0500 Received: from belushi.uits.indiana.edu ([129.79.1.188]:56915) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQ4Pb-0004to-0v for emacs-orgmode@gnu.org; Wed, 30 Dec 2009 14:40:51 -0500 Received: from mail-relay.iu.edu (candy.uits.indiana.edu [129.79.1.201]) by belushi.uits.indiana.edu (8.14.2/8.13.8/IU Messaging Team) with ESMTP id nBUJellt008857 for ; Wed, 30 Dec 2009 14:40:47 -0500 Received: from 149-166-143-159.dhcp-in.iupui.edu (149-166-143-159.dhcp-in.iupui.edu [149.166.143.159]) (authenticated bits=0) by mail-relay.iu.edu (8.14.2/8.13.8/IU Messaging Team Submission) with ESMTP id nBUJekEB001240 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 30 Dec 2009 14:40:46 -0500 In-Reply-To: <4D8BBF51-8F5A-47E4-99F4-603E349BDD99@gmail.com> 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: Org Mode 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: >=20 > - 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