emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Andrew J. Korty" <ajk@iu.edu>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Speeding up agenda display
Date: Thu, 31 Dec 2009 08:45:43 +0100	[thread overview]
Message-ID: <8CAD865A-01AA-49B7-AEE5-1FF088865282@gmail.com> (raw)
In-Reply-To: <CFB7C0AA-DD5A-44C0-9AD5-44FE32E14023@iu.edu>

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

  reply	other threads:[~2009-12-31  7:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 19:06 Speeding up agenda display Andrew J. Korty
2009-12-30 19:20 ` Carsten Dominik
2009-12-30 19:40   ` Andrew J. Korty
2009-12-31  7:45     ` Carsten Dominik [this message]
2009-12-31 17:46       ` Andrew J. Korty
2010-01-02  7:50         ` Carsten Dominik
2010-01-02 14:38           ` Andrew J. Korty
2010-01-02 19:37             ` Carsten Dominik
2010-01-03  3:40               ` Andrew J. Korty
2010-01-03 12:42                 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8CAD865A-01AA-49B7-AEE5-1FF088865282@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=ajk@iu.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).