all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ANN] Agenda speed up
@ 2017-08-27 16:16 Nicolas Goaziou
  2017-08-27 16:22 ` Nicolas Goaziou
                   ` (5 more replies)
  0 siblings, 6 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-08-27 16:16 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

Hello,

I rewrote the part responsible for agenda generation in "org-agenda.el".
Basically, I refactored some hot loops and introduced a cache mechanism
for data extracted out of agenda files.

I expect to see some interesting improvements when viewing the agenda
with a span larger than one day, or when generating an agenda view
without having touched most of the agenda files since last view.

Some feedback about the new agenda speed would be nice.

Also, I certainly broke a few things along the way. Please report
anything suspicious.

The only thing that is expected to be defective is
`org-agenda-include-inactive-timestamps'. It has no effect at the
moment. I can activate it again, but I'm wondering if it's worth the
overhead. It is already possible to display clocks and closed timestamps
in the agenda. Other inactive timestamps could be ignored from the
agenda altogether. This is their sole purpose, after all. WDYT?

I attach the behemoth patch here for quick testing. Further bug fixes
will happen in "wip-agenda-speedup" branch.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Speed-up-Agenda-generation.patch --]
[-- Type: text/x-diff, Size: 110841 bytes --]

From f5dc1c8c5a439d93162598b25e6744ffee81af3a Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Sun, 27 Aug 2017 17:00:27 +0200
Subject: [PATCH] Speed up Agenda generation

* lisp/org-agenda.el (org-agenda--skip-position): New variable.

(org-agenda-log-mode-items): Change default value.
(org-agenda-log-mode): Use new values.

(org-agenda-new-marker): Remove `org-agenda-buffer'
(org-agenda-show-log-scoped): Remove variable.

(org-agenda--file-data):
(org-agenda--clock-data):
(org-agenda--closed-data):
(org-agenda--planning-data):
(org-agenda--state-data):
(org-agenda--timestamp-data):
(org-agenda--diary-data):
(org-agenda--todo-data):
(org-agenda--entry-from-log):
(org-agenda--entry-from-deadline):
(org-agenda--entry-from-diary):
(org-agenda--entry-from-range):
(org-agenda--entry-from-scheduled):
(org-agenda--entry-from-timestamp):
(org-agenda--entry-from-todo): New functions.

(org-agenda-list):
(org-todo-list): Refactor.
(org-diary): Fix docstring.  Refactor.
(org-agenda-day-entries): Change signature.  Rewrite function.
(org-agenda-entry-get-agenda-timestamp): Change signature.  Refactor.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item): Change
signature.  Refactor.

(org-agenda-get-todos):
(org-agenda-get-timestamps):
(org-agenda-get-sexps):
(org-agenda-get-progress):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks): Remove functions.
(org-agenda-to-appt): Apply changes.
---
 lisp/org-agenda.el | 2492 +++++++++++++++++++++++++++-------------------------
 lisp/org.el        |    2 +-
 2 files changed, 1318 insertions(+), 1176 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index fe7c4f291..9e3f151a3 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -95,15 +95,25 @@
 (defvar org-agenda-buffer-name "*Org Agenda*")
 (defvar org-agenda-overriding-header nil)
 (defvar org-agenda-title-append nil)
+(defvar org-select-this-todo-keyword nil)
+(defvar org-last-arg nil)
+
 (with-no-warnings (defvar entry)) ;; unprefixed, from calendar.el
 (with-no-warnings (defvar date))  ;; unprefixed, from calendar.el
 (defvar original-date) ; dynamically scoped, calendar.el does scope this
 
 (defvar org-agenda-undo-list nil
   "List of undoable operations in the agenda since last refresh.")
+
 (defvar org-agenda-pending-undo-list nil
   "In a series of undo commands, this is the list of remaining undo items.")
 
+(defvar org-agenda--skip-position nil
+  "Alist specifying skip position per entry category.
+Elements follow the pattern (CATEGORY . POSITION), meaning any
+entry, as returned by `org-agenda--file-data', of CATEGORY (e.g.,
+`todo') located before POSITION should be skipped.")
+
 (defcustom org-agenda-confirm-kill 1
   "When set, remote killing from the agenda buffer needs confirmation.
 When t, a confirmation is always needed.  When a number N, confirmation is
@@ -1306,19 +1316,21 @@ for the number of days given here."
   :package-version '(Org . "9.1")
   :safe 'integerp)
 
-(defcustom org-agenda-log-mode-items '(closed clock)
+(defcustom org-agenda-log-mode-items '(:closed :clock)
   "List of items that should be shown in agenda log mode.
 \\<org-agenda-mode-map>\
 This list may contain the following symbols:
 
-  closed    Show entries that have been closed on that day.
-  clock     Show entries that have received clocked time on that day.
-  state     Show all logged state changes.
+  :closed    Show entries that have been closed on that day.
+  :clock     Show entries that have received clocked time on that day.
+  :state     Show all logged state changes.
 Note that instead of changing this variable, you can also press \
 `\\[universal-argument] \\[org-agenda-log-mode]' in
 the agenda to display all available LOG items temporarily."
   :group 'org-agenda-daily/weekly
-  :type '(set :greedy t (const closed) (const clock) (const state)))
+  :version "26.1"
+  :package-version '(Org . "9.2")
+  :type '(set :greedy t (const :closed) (const :clock) (const :state)))
 
 (defcustom org-agenda-clock-consistency-checks
   '(:max-duration "10:00" :min-duration 0 :max-gap "0:05"
@@ -4000,10 +4012,7 @@ Maker is at point, or at POS if non-nil.  Org mode keeps a list of
 these markers and resets them when they are no longer in use."
   (let ((m (copy-marker (or pos (point)) t)))
     (setq org-agenda-last-marker-time (float-time))
-    (if org-agenda-buffer
-	(with-current-buffer org-agenda-buffer
-	  (push m org-agenda-markers))
-      (push m org-agenda-markers))
+    (push m org-agenda-markers)
     m))
 
 (defun org-agenda-reset-markers ()
@@ -4067,8 +4076,7 @@ This check for agenda markers in all agenda buffers currently active."
 	 'org-agenda-date-weekend)
 	(t 'org-agenda-date)))
 
-(defvar org-agenda-show-log-scoped)
-
+\f
 ;;; Agenda Daily/Weekly
 
 (defvar org-agenda-start-day nil  ; dynamically scoped parameter
@@ -4077,10 +4085,957 @@ Custom commands can set this variable in the options section.
 This is usually a string like \"2007-11-01\", \"+2d\" or any other
 input allowed when reading a date through the Org calendar.
 See the docstring of `org-read-date' for details.")
+
 (defvar org-starting-day nil) ; local variable in the agenda buffer
+
 (defvar org-arg-loc nil) ; local variable
 
+(defvar org-agenda--data-cache (make-hash-table :test #'equal)
+  "Hash table containing currently known agenda data.
+Keys are files' truenames, as returned by `file-truename'.")
+
+(defun org-agenda--file-data (file types)
+  "Return agenda-related data in FILE for TYPES.
+
+FILE is the path to a file to be checked for entries.  TYPES are
+symbols indicating which kind of entries should be extracted.
+For details about these, see the documentation of `org-diary'.
+
+Throw an error if FILE doesn't exist or isn't an Org file."
+  (with-current-buffer (if (file-exists-p file)
+			   (let ((org-inhibit-startup t))
+			     (org-get-agenda-file-buffer file))
+			 (error "No such file %S" file))
+    (unless (derived-mode-p 'org-mode)
+      (error "Agenda file %S is not in `org-mode'" file))
+    ;; Cache parsed data.  Cache is cleared any time there is
+    ;; a checksum mismatch with the contents of the buffer.  Moreover,
+    ;; TODO keywords are the only agenda-related syntax that can
+    ;; change without the buffer being altered.  Since checksum cannot
+    ;; help, we need to also check list of TODO keywords.
+    (let* ((key (file-truename file))
+	   (cache
+	    (let ((store (gethash key org-agenda--data-cache))
+		  (checksum (sha1 (current-buffer))))
+	      (if (and store
+		       (equal checksum (cdr (assq :checksum store))))
+		  store
+		;; Initialize or reset cache.
+		`((:checksum . ,checksum)
+		  (:todo-regexp . ,org-todo-regexp)))))
+	   (results nil))
+      (save-excursion
+	(save-restriction
+	  (if (eq (current-buffer) org-agenda-restrict)
+	      (narrow-to-region org-agenda-restrict-begin
+				org-agenda-restrict-end)
+	    (widen))
+	  ;; Group planning types into the same category since they
+	  ;; are extracted with a common function.
+	  (dolist (type (delete-dups
+			 (mapcar (lambda (type)
+				   (if (memq type
+					     '(:deadline :deadline* :scheduled
+							 :scheduled*))
+				       :planning
+				     type))
+				 types)))
+	    (pcase (assq type cache)
+	      (`(,(pred (eq type)) . ,data) ;cached data spotted
+	       (let ((todo-info (assq :todo-regexp cache)))
+		 (when (and (eq type :todo)
+			    (not (equal org-todo-regexp (cdr todo-info))))
+		   ;; TODO keywords changed: we must refresh cache.
+		   (setq data (org-agenda--todo-data))
+		   (setcdr (assq :todo cache) data)
+		   (setcdr todo-info org-todo-regexp)))
+	       (setq results (append data results)))
+	      (_
+	       (org-with-point-at 1
+		 (let ((data
+			(if (eq type :sexp) (org-agenda--diary-data)
+			  ;; Skip contents before first headline,
+			  ;; since there would be no entry to display.
+			  (when (re-search-forward org-outline-regexp-bol nil t)
+			    (beginning-of-line)
+			    (pcase type
+			      (`:clock (org-agenda--clock-data))
+			      (`:closed (org-agenda--closed-data))
+			      (`:planning (org-agenda--planning-data))
+			      (`:state (org-agenda--state-data))
+			      (`:timestamp (org-agenda--timestamp-data))
+			      (`:todo (org-agenda--todo-data))
+			      (_ (error "Unknown entry type: %S" type)))))))
+		   (push (cons type data) cache)
+		   (puthash key cache org-agenda--data-cache)
+		   (setq results (append data results)))))))))
+      (sort results #'car-less-than-car))))
+
+(defun org-agenda--clock-data ()
+  "Extract log data from current buffer, starting from point.
+Return a list of (POSITION clock TIMESTAMP DURATION) elements.
+POSITION is the beginning of the datum.  TIMESTAMP is the
+associated time-stamp.  DURATION is the clock duration as
+a string."
+  (let ((result nil))
+    (org-with-wide-buffer
+     (while (re-search-forward org-clock-line-re nil t)
+       (let ((element (org-element-at-point)))
+	 (when (eq 'clock (org-element-type element))
+	   (let ((timestamp (progn
+			      (skip-chars-forward " \t")
+			      (and (looking-at org-tsr-regexp-both)
+				   (match-string 0)))))
+	     (when timestamp
+	       (push (list (line-beginning-position)
+			   'clock
+			   timestamp
+			   (org-element-property :duration element))
+		     result)))))))
+    result))
+
+(defun org-agenda--closed-data ()
+  "Extract log data from current buffer, starting from point.
+Return a list of (POSITION closed TIMESTAMP nil) elements.
+POSITION is the beginning of the datum.  TIMESTAMP is the
+associated time-stamp."
+  (let ((result nil))
+    (org-with-wide-buffer
+     (while (re-search-forward org-closed-string nil t)
+       (catch :next
+	 (when (org-at-planning-p)
+	   (let ((timestamp (progn
+			      (skip-chars-forward " \t")
+			      (and (looking-at org-tsr-regexp-both)
+				   (match-string 0)))))
+	     (when timestamp
+	       (push (list (line-beginning-position) 'closed timestamp nil)
+		     result)))))))
+    result))
+
+(defun org-agenda--planning-data ()
+  "Extract planning data from current buffer, starting from point.
+Return a list of (POSITION TYPE TIMESTAMP) elements.  POSITION is
+the beginning of the planning line.  TYPE is a symbol among
+`deadline' and `scheduled'.  TIMESTAMP is the associated
+time-stamp, as a string."
+  (let ((result nil))
+    (org-with-wide-buffer
+     (while (re-search-forward org-planning-line-re nil t)
+       (when (org-at-planning-p)
+	 (save-excursion
+	   (beginning-of-line)
+	   (let ((end (line-end-position)))
+	     (save-excursion
+	       (when (re-search-forward org-deadline-time-regexp end t)
+		 (push (list (line-beginning-position)
+			     'deadline
+			     (match-string 1))
+		       result)))
+	     (save-excursion
+	       (when (re-search-forward org-scheduled-time-regexp end t)
+		 (push (list (line-beginning-position)
+			     'scheduled
+			     (match-string 1))
+		       result))))))))
+    result))
+
+(defun org-agenda--state-data ()
+  "Extract log data from current buffer, starting from point.
+Return a list of (POSITION state nil STATE) elements.  POSITION
+is the beginning of the datum.  STATE is the TODO state as
+a string."
+  (let ((result nil))
+    (org-with-wide-buffer
+     (while (re-search-forward "^[ \t]*- State \"\\([a-zA-Z0-9]+\\)\"" nil t)
+       (catch :next
+	 (let* ((state (match-string 1)))
+	   (push (list (line-beginning-position) 'state nil state)
+		 result)))))
+    result))
+
+(defun org-agenda--timestamp-data ()
+  "Extract plain timestamp data from current buffer, starting from point.
+Return a list of (POSITION TYPE START END) elements.  POSITION is
+the beginning position of the first timestamp.  TYPE is either
+`range' or `timestamp'.  START is the first timestamp.  END is
+the last one for `range' type or nil."
+  (let ((regexp (concat org-ts-regexp "\\|" "<%%\\(([^>\n]+)\\)>"))
+	(result nil))
+    (org-with-wide-buffer
+     (while (re-search-forward regexp nil t)
+       (unless (save-match-data (org-at-planning-p))
+	 (let ((pos (match-beginning 0)))
+	   ;; Distinguish between plain time-stamps and time-stamp
+	   ;; ranges.  In the second case, move after the whole match
+	   ;; to avoid re-matching second time-stamp.
+	   (goto-char (match-beginning 0))
+	   (push (if (and (looking-at org-tsr-regexp)
+			  (match-end 3))
+		     (list pos 'range (match-string 1) (match-string 3))
+		   (list pos 'timestamp (match-string 0) nil))
+		 result)
+	   (goto-char (match-end 0))))))
+    result))
+
+(defun org-agenda--diary-data ()
+  "Extract S-exp diary data from current buffer, starting from point.
+Return a list of (POSITION diary SEXP TEXT) elements.  POSITION
+is the beginning position of the diary entry.  SEXP is the diary
+S-exp, as a string.  TEXT is the text following the S-exp, as
+a string."
+  (let ((result nil))
+    (org-with-wide-buffer
+     (while (re-search-forward "^%%(" nil t)
+       (forward-char -1)
+       (let ((start (point))
+	     (pos (line-beginning-position)))
+	 (forward-sexp)
+	 (let ((sexp (buffer-substring start (point)))
+	       (text (progn (looking-at ".*$")
+			    (org-trim (match-string 0)))))
+	   (push (list pos 'diary sexp text) result)))))
+    result))
+
+(defun org-agenda--todo-data ()
+  "Extract TODO data from current buffer, starting from point.
+Return a list of (POSITION todo TODO) elements.  POSITION is the
+beginning position of the headline.  TODO is its keyword."
+  (let ((regexp (format "^\\*+ +\\(%s\\)" org-todo-regexp))
+	(result nil))
+    (org-with-wide-buffer
+     (while (let ((case-fold-search nil)) (re-search-forward regexp nil t))
+       (push (list (line-beginning-position)
+		   'todo
+		   (match-string 1)
+		   (buffer-substring (match-beginning 1) (line-end-position)))
+	     result)))
+    result))
+
+(defun org-agenda--entry-from-log (date datum)
+  "Return agenda entry for DATE associated to log data.
+
+DATE is a list of the form (MONTH DAY YEAR).  DATUM is a list of
+the form (POS TYPE TIMESTAMP EXTRA).  POS is the location of the
+log data.  TYPE is `clock', `closed' or `state'.  TIMESTAMP the
+clock or closed timestamp, or nil.  EXTRA is the TODO state,
+a clock duration, or nil.
+
+Throw `:skip' if no entry is associated to DATUM at DATE.  Leave
+point past entries that should be ignored."
+  (pcase-let* ((`(,pos ,type ,timestamp ,extra) datum)
+	       (org-agenda-search-headline-for-time nil))
+    (goto-char pos)
+    (org-agenda-skip)
+    (let ((notes
+	   (cond ((not org-agenda-log-mode-add-notes) nil)
+		 ((eq type 'state)
+		  (and (looking-at ".*\\\\\n[ \t]*\\([^-\n \t].*?\\)[ \t]*$")
+		       (match-string 1)))
+		 ((eq type 'clock)
+		  (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$")
+		       (match-string 1)))
+		 (t nil))))
+      (save-excursion
+	(re-search-backward "^\\*+[ \t]+" nil t)
+	(goto-char (match-end 0))
+	(let* ((marker (org-agenda-new-marker pos))
+	       (hdmarker (org-agenda-new-marker (line-beginning-position)))
+	       (category (org-get-category))
+	       (level (make-string (org-reduced-level (org-outline-level))
+				   ?\s))
+	       (inherited-tags
+		(or (eq org-agenda-show-inherited-tags 'always)
+		    (and (listp org-agenda-show-inherited-tags)
+			 (memq 'todo org-agenda-show-inherited-tags))
+		    (and (eq org-agenda-show-inherited-tags t)
+			 (or (eq org-agenda-use-tag-inheritance t)
+			     (memq 'todo org-agenda-use-tag-inheritance)))))
+	       (tags (org-get-tags-at nil (not inherited-tags)))
+	       (headline (buffer-substring (point) (line-end-position)))
+	       (item
+		(org-agenda-format-item
+		 (pcase type
+		   (`closed "Closed:    ")
+		   (`state (format "State:     (%s)" extra))
+		   (_ (format "Clocked:   (%s)" (or extra "-"))))
+		 (cond
+		  ((not notes) headline)
+		  ((string-match "[ \t]+\\(:[^ \n\t]*?:\\)[ \t]*$" headline)
+		   (replace-match (format " - %s \\1" notes) nil nil headline 1))
+		  (t (concat headline " - " notes)))
+		 level category tags timestamp)))
+	  (org-add-props item nil
+	    'date date
+	    'done-face 'org-agenda-done
+	    'face 'org-agenda-done
+	    'help-echo (format "mouse-2 or RET jump to Org file %S"
+			       (abbreviate-file-name
+				(buffer-file-name (buffer-base-buffer))))
+	    'level level
+	    'mouse-face 'highlight
+	    'org-complex-heading-regexp org-complex-heading-regexp
+	    'org-hd-marker hdmarker
+	    'org-marker marker
+	    'org-not-done-regexp org-not-done-regexp
+	    'org-todo-regexp org-todo-regexp
+	    'priority 100000
+	    'type "closed"
+	    'undone-face 'org-warning))))))
+
+(defun org-agenda--entry-from-deadline (date datum with-hour)
+  "Return agenda entry for DATE associated to a deadline.
+
+DATE is a list of the form (MONTH DAY YEAR).  DATUM is a list of
+the form (POS deadline TIMESTAMP) where POS is the location of
+deadline and TIMESTAMP the deadline's timestamp.
+
+When WITH-HOUR is non-nil, only return deadlines with an hour
+specification like [h]h:mm.
+
+Throw `:skip' if no entry is associated to DATUM at DATE.  Leave
+point past entries that should be ignored."
+  (pcase-let
+      ((`(,pos ,_ ,base) datum)
+       (current (calendar-absolute-from-gregorian date)))
+    (goto-char pos)
+    ;; Remove deadlines without an hour if WITH-HOUR is non-nil.
+    (when (and with-hour
+	       (not
+		(string-match-p "[0-9][0-9]?:[0-9][0-9]?[-0-9+:hdwmy \t.]*\\'"
+				base)))
+      (throw :skip nil))
+    (org-agenda-skip)
+    (let* ((sexp? (string-prefix-p "%%" base))
+	   (today (org-today))
+	   (today? (org-agenda-today-p date))
+	   (todo-state (org-get-todo-state))
+	   (done? (member todo-state org-done-keywords))
+	   ;; DEADLINE is the deadline date for the entry.  It is
+	   ;; either the base date or the last repeat, according to
+	   ;; `org-agenda-prefer-last-repeat'.
+	   (deadline
+	    (cond (sexp? (org-agenda--timestamp-to-absolute base current))
+		  ((or (eq org-agenda-prefer-last-repeat t)
+		       (member todo-state org-agenda-prefer-last-repeat))
+		   (org-agenda--timestamp-to-absolute
+		    base today 'past (current-buffer) pos))
+		  (t (org-agenda--timestamp-to-absolute base))))
+	   ;; REPEAT is the future repeat closest from CURRENT,
+	   ;; according to `org-agenda-show-future-repeats'. If the
+	   ;; latter is nil, or if the time stamp has no repeat part,
+	   ;; default to DEADLINE.
+	   (repeat
+	    (cond (sexp? deadline)
+		  ((<= current today) deadline)
+		  ((not org-agenda-show-future-repeats) deadline)
+		  (t
+		   (let ((next (if (eq org-agenda-show-future-repeats 'next)
+				   (1+ today)
+				 current)))
+		     (org-agenda--timestamp-to-absolute
+		      base next 'future (current-buffer) pos)))))
+	   (diff (- deadline current))
+	   (suppress-prewarning
+	    (let ((scheduled
+		   (and org-agenda-skip-deadline-prewarning-if-scheduled
+			(org-entry-get nil "SCHEDULED"))))
+	      (cond
+	       ((not scheduled) nil)
+	       ;; The current item has a scheduled date, so
+	       ;; evaluate its prewarning lead time.
+	       ((integerp org-agenda-skip-deadline-prewarning-if-scheduled)
+		;; Use global prewarning-restart lead time.
+		org-agenda-skip-deadline-prewarning-if-scheduled)
+	       ((eq org-agenda-skip-deadline-prewarning-if-scheduled
+		    'pre-scheduled)
+		;; Set pre-warning to no earlier than SCHEDULED.
+		(min (- deadline
+			(org-agenda--timestamp-to-absolute scheduled))
+		     org-deadline-warning-days))
+	       ;; Set pre-warning to deadline.
+	       (t 0))))
+	   (wdays (if suppress-prewarning
+		      (let ((org-deadline-warning-days suppress-prewarning))
+			(org-get-wdays base))
+		    (org-get-wdays base))))
+      (cond
+       ;; Only display deadlines at their base date, at future
+       ;; repeat occurrences or in today agenda.
+       ((= current deadline) nil)
+       ((= current repeat) nil)
+       ((not today?) (throw :skip nil))
+       ;; Upcoming deadline: display within warning period WDAYS.
+       ((> deadline current) (when (> diff wdays) (throw :skip nil)))
+       ;; Overdue deadline: warn about it for
+       ;; `org-deadline-past-days' duration.
+       (t (when (< org-deadline-past-days (- diff)) (throw :skip nil))))
+      ;; Possibly skip DONE tasks.
+      (when (and done?
+		 (or org-agenda-skip-deadline-if-done
+		     (/= deadline current)))
+	(throw :skip nil))
+      (save-excursion
+	(re-search-backward "^\\*+[ \t]+" nil t)
+	(goto-char (match-end 0))
+	(let* ((category (org-get-category))
+	       (level (make-string (org-reduced-level (org-outline-level))
+				   ?\s))
+	       (head (buffer-substring (point) (line-end-position)))
+	       (inherited-tags
+		(or (eq org-agenda-show-inherited-tags 'always)
+		    (and (listp org-agenda-show-inherited-tags)
+			 (memq 'agenda org-agenda-show-inherited-tags))
+		    (and (eq org-agenda-show-inherited-tags t)
+			 (or (eq org-agenda-use-tag-inheritance t)
+			     (memq 'agenda
+				   org-agenda-use-tag-inheritance)))))
+	       (tags (org-get-tags-at nil (not inherited-tags)))
+	       (time
+		(cond
+		 ;; No time of day designation if it is only
+		 ;; a reminder.
+		 ((and (/= current deadline) (/= current repeat)) nil)
+		 ((string-match " \\([012]?[0-9]:[0-9][0-9]\\)" base)
+		  (concat (substring base (match-beginning 1)) " "))
+		 (t 'time)))
+	       (item
+		(org-agenda-format-item
+		 ;; Insert appropriate suffixes before deadlines.
+		 ;; Those only apply to today agenda.
+		 (pcase-let ((`(,now ,next ,past) org-agenda-deadline-leaders))
+		   (cond
+		    ((and today? (< deadline today)) (format past (- diff)))
+		    ((and today? (> deadline today)) (format next diff))
+		    (t now)))
+		 head level category tags time))
+	       (face (org-agenda-deadline-face
+		      (- 1 (/ (float diff) (max wdays 1)))))
+	       (upcoming? (and today? (> deadline today)))
+	       (warntime (get-text-property (point) 'org-appt-warntime)))
+	  (org-add-props item nil
+	    'date (if upcoming? date deadline)
+	    'done-face 'org-agenda-done
+	    'face (if done? 'org-agenda-done face)
+	    'help-echo (format "mouse-2 or RET jump to Org file %S"
+			       (abbreviate-file-name
+				(buffer-file-name (buffer-base-buffer))))
+	    'level level
+	    'mouse-face 'highlight
+	    'org-complex-heading-regexp org-complex-heading-regexp
+	    'org-hd-marker (org-agenda-new-marker (line-beginning-position))
+	    'org-marker (org-agenda-new-marker pos)
+	    'org-not-done-regexp org-not-done-regexp
+	    'org-todo-regexp org-todo-regexp
+	    ;; Adjust priority to today reminders about deadlines.
+	    ;; Overdue deadlines get the highest priority increase,
+	    ;; then imminent deadlines and eventually more distant
+	    ;; deadlines.
+	    'priority (let ((adjust (if today? (- diff) 0)))
+			(+ adjust (org-get-priority item)))
+	    'todo-state todo-state
+	    'ts-date deadline
+	    'type (if upcoming? "upcoming-deadline" "deadline")
+	    'undone-face face
+	    'warntime warntime))))))
+
+(defun org-agenda--entry-from-diary (date datum)
+  "Return diary entries for DATE associated to a diary S-exp entry.
+
+DATE is a list of the form (MONTH DAY YEAR).  DATUM is a list of
+the form (POS diary SEXP TEXT) where POS is the location of
+strings SEXP and TEXT.
+
+Throw `:skip' if no entry is associated to DATUM at DATE.  Return
+a list of strings.  Leave point past entries that should be
+ignored."
+  (require 'diary-lib)
+  (pcase-let* ((`(,pos ,_ ,sexp ,text) datum)
+	       (result (org-diary-sexp-entry sexp text date)))
+    (goto-char pos)
+    (unless result (throw :skip nil))
+    (let* ((category (org-get-category))
+	   (marker (org-agenda-new-marker))
+	   (level (make-string (org-reduced-level (org-outline-level))
+			       ?\s))
+	   (inherited-tags
+	    (or (eq org-agenda-show-inherited-tags 'always)
+		(and (listp org-agenda-show-inherited-tags)
+		     (memq 'agenda org-agenda-show-inherited-tags))
+		(and (eq org-agenda-show-inherited-tags t)
+		     (or (eq org-agenda-use-tag-inheritance t)
+			 (memq 'agenda org-agenda-use-tag-inheritance)))))
+	   (tags (org-get-tags-at nil (not inherited-tags)))
+	   (todo-state (org-get-todo-state))
+	   (warntime (get-text-property (point) 'org-appt-warntime))
+	   (extra nil)
+	   (entries nil))
+      (dolist (entry (if (stringp result) (list result) result))
+	(when (and org-agenda-diary-sexp-prefix
+		   (string-match org-agenda-diary-sexp-prefix entry))
+	  (setq extra (match-string 0 entry))
+	  (setq entry (replace-match "" nil nil entry)))
+	(let* ((text (or (org-string-nw-p entry)
+			 "SEXP entry returned empty string"))
+	       (item (org-agenda-format-item
+		      extra text level category tags 'time)))
+	  (push (org-add-props item nil
+		  'date date
+		  'face 'org-agenda-calendar-sexp
+		  'help-echo (format "mouse-2 or RET jump to Org file %S"
+				     (abbreviate-file-name
+				      (buffer-file-name (buffer-base-buffer))))
+		  'level level
+		  'mouse-face 'highlight
+		  'org-marker marker
+		  'todo-state todo-state
+		  'type "sexp"
+		  'warntime warntime)
+		entries)))
+      entries)))
+
+(defun org-agenda--entry-from-range (date data)
+  "Return agenda entry for DATE associated to a time-stamp range.
+
+DATE is a list of the form (MONTH DAY YEAR).  DATA is list of the
+form (POS range START END) where POS is the location of the
+time-stamp range, START and END are, respectively, the beginning
+and the end of the range, as strings.  POS is the location of the
+time-stamp in the current buffer.
+
+Throw `:skip' if no entry is associated to DATA at DATE.  Leave
+point past entries that should be ignored."
+  (pcase-let* ((`(,pos ,_ ,start-stamp ,end-stamp) data)
+	       (current (calendar-absolute-from-gregorian date))
+	       (start (org-agenda--timestamp-to-absolute
+		       start-stamp nil nil (current-buffer) pos))
+	       (end (org-agenda--timestamp-to-absolute
+		     end-stamp nil nil (current-buffer) pos))
+	       (todo-state nil))
+    (goto-char pos)
+    (when (or (< current start) (> current end))
+      ;; DATE is outside the range.
+      (throw :skip nil))
+    (setq todo-state (org-get-todo-state))
+    (when (and org-agenda-skip-timestamp-if-done
+	       (member todo-state org-done-keywords))
+      (throw :skip nil))
+    (org-agenda-skip)
+    (save-excursion
+      (re-search-backward org-outline-regexp-bol nil t)
+      ;; Format entry as a return value.
+      (let* ((category (org-get-category pos))
+	     (head (progn (looking-at "\\*+[ \t]+\\(.*\\)")
+			  (match-string 1)))
+	     (remove-re (and org-agenda-remove-timeranges-from-blocks
+			     (format "<%s.*?>--<%s.*?>"
+				     (regexp-quote start-stamp)
+				     (regexp-quote end-stamp))))
+	     (marker (org-agenda-new-marker pos))
+	     (hdmarker (org-agenda-new-marker (point)))
+	     (category (org-get-category))
+	     (inherited-tags
+	      (or (eq org-agenda-show-inherited-tags 'always)
+		  (and (listp org-agenda-show-inherited-tags)
+		       (memq 'agenda org-agenda-show-inherited-tags))
+		  (and (eq org-agenda-show-inherited-tags t)
+		       (or (eq org-agenda-use-tag-inheritance t)
+			   (memq 'agenda org-agenda-use-tag-inheritance)))))
+	     (tags (org-get-tags-at nil (not inherited-tags)))
+	     (level (make-string (org-reduced-level (org-outline-level))
+				 ?\s))
+	     (item (org-agenda-format-item
+		    (format (nth (if (= start end) 0 1)
+				 org-agenda-timerange-leaders)
+			    (1+ (- current start))
+			    (1+ (- end start)))
+		    head level category tags
+		    (cond ((and (= start current) (= end current))
+			   (format "<%s>--<%s>" start-stamp end-stamp))
+			  ((= start current) (format "<%s>" start-stamp))
+			  ((= end current) (format "<%s>" end-stamp)))
+		    remove-re)))
+	(org-add-props item nil
+	  'date date
+	  'face nil
+	  'help-echo (format "mouse-2 or RET jump to Org file %S"
+			     (abbreviate-file-name
+			      (buffer-file-name (buffer-base-buffer))))
+	  'level level
+	  'mouse-face 'highlight
+	  'org-complex-heading-regexp org-complex-heading-regexp
+	  'org-marker marker 'org-hd-marker hdmarker
+	  'org-not-done-regexp org-not-done-regexp
+	  'org-todo-regexp org-todo-regexp
+	  'priority (org-get-priority item)
+	  'todo-state todo-state
+	  'type "block")))))
+
+(defun org-agenda--entry-from-scheduled (date datum deadlines with-hour)
+  "Return agenda entry for DATE associated to a schedule.
+
+DATE is a list of the form (MONTH DAY YEAR).  DATUM is a list of
+the form (POS scheduled TIMESTAMP) where POS is the location of
+schedule and TIMESTAMP the schedule's timestamp. DEADLINES is
+a list of positions for deadlines displayed in the agenda.  When
+WITH-HOUR is non-nil, only return schedules with an hour
+specification like [h]h:mm.
+
+Throw `:skip' if no entry is associated to DATUM at DATE.  Leave
+point past entries that should be ignored."
+  (pcase-let* ((`(,pos ,_ ,base) datum)
+	       (today (org-today))
+	       (current (calendar-absolute-from-gregorian date))
+	       (today? (org-agenda-today-p date)))
+    (goto-char pos)
+    (when (and with-hour
+	       (not
+		(string-match-p "[0-9][0-9]?:[0-9][0-9]?[-0-9+:hdwmy \t.]*\\'"
+				base)))
+      (throw :skip nil))
+    (org-agenda-skip)
+    (let* ((sexp? (string-prefix-p "%%" base))
+	   (todo-state (save-match-data (org-get-todo-state)))
+	   (done? (member todo-state org-done-keywords))
+	   ;; SCHEDULE is the scheduled date for the entry.  It is
+	   ;; either the bare date or the last repeat, according to
+	   ;; `org-agenda-prefer-last-repeat'.
+	   (schedule
+	    (cond
+	     (sexp? (org-agenda--timestamp-to-absolute base current))
+	     ((or (eq org-agenda-prefer-last-repeat t)
+		  (member todo-state org-agenda-prefer-last-repeat))
+	      (org-agenda--timestamp-to-absolute
+	       base today 'past (current-buffer) pos))
+	     (t (org-agenda--timestamp-to-absolute base))))
+	   ;; REPEAT is the future repeat closest from CURRENT,
+	   ;; according to `org-agenda-show-future-repeats'. If the
+	   ;; latter is nil, or if the time stamp has no repeat
+	   ;; part, default to SCHEDULE.
+	   (repeat
+	    (cond
+	     (sexp? schedule)
+	     ((<= current today) schedule)
+	     ((not org-agenda-show-future-repeats) schedule)
+	     (t
+	      (let ((next (if (eq org-agenda-show-future-repeats 'next)
+			      (1+ today)
+			    current)))
+		(org-agenda--timestamp-to-absolute
+		 base next 'future (current-buffer) pos)))))
+	   (diff (- current schedule))
+	   (warntime (get-text-property (point) 'org-appt-warntime))
+	   (pastschedp (< schedule today))
+	   (habit? (and (fboundp 'org-is-habit-p) (org-is-habit-p)))
+	   (suppress-delay
+	    (let ((deadline (and org-agenda-skip-scheduled-delay-if-deadline
+				 (org-entry-get nil "DEADLINE"))))
+	      (cond
+	       ((not deadline) nil)
+	       ;; The current item has a deadline date, so
+	       ;; evaluate its delay time.
+	       ((integerp org-agenda-skip-scheduled-delay-if-deadline)
+		;; Use global delay time.
+		(- org-agenda-skip-scheduled-delay-if-deadline))
+	       ((eq org-agenda-skip-scheduled-delay-if-deadline
+		    'post-deadline)
+		;; Set delay to no later than DEADLINE.
+		(min (- schedule (org-agenda--timestamp-to-absolute deadline))
+		     org-scheduled-delay-days))
+	       (t 0))))
+	   (ddays
+	    (cond
+	     ;; Nullify delay when a repeater triggered already
+	     ;; and the delay is of the form --Xd.
+	     ((and (string-match-p "--[0-9]+[hdwmy]" base)
+		   (> current schedule))
+	      0)
+	     (suppress-delay
+	      (let ((org-scheduled-delay-days suppress-delay))
+		(org-get-wdays base t t)))
+	     (t (org-get-wdays base t)))))
+      ;; Display scheduled items at base date (SCHEDULE), today if
+      ;; scheduled before the current date, and at any repeat past
+      ;; today.  However, skip delayed items and items that have
+      ;; been displayed for more than `org-scheduled-past-days'.
+      (unless (and today?
+		   habit?
+		   (bound-and-true-p org-habit-show-all-today))
+	(when (or (and (> ddays 0) (< diff ddays))
+		  (> diff org-scheduled-past-days)
+		  (> schedule current)
+		  (and (/= current schedule)
+		       (/= current today)
+		       (/= current repeat)))
+	  (throw :skip nil)))
+      ;; Possibly skip DONE tasks.
+      (when (and done?
+		 (or org-agenda-skip-scheduled-if-done
+		     (/= schedule current)))
+	(throw :skip nil))
+      ;; Skip entry if it already appears as a deadline, per
+      ;; `org-agenda-skip-scheduled-if-deadline-is-shown'.  This
+      ;; doesn't apply to habits.
+      (when (pcase org-agenda-skip-scheduled-if-deadline-is-shown
+	      ((guard
+		(or habit?
+		    (not (memq (line-beginning-position 0) deadlines))))
+	       nil)
+	      (`repeated-after-deadline
+	       (let ((deadline (time-to-days
+				(org-get-deadline-time (point)))))
+		 (and (<= schedule deadline) (> current deadline))))
+	      (`not-today pastschedp)
+	      (`t t)
+	      (_ nil))
+	(throw :skip nil))
+      ;; Skip habits if `org-habit-show-habits' is nil, or if we
+      ;; only show them for today.  Also skip done habits.
+      (when (and habit?
+		 (or done?
+		     (not (bound-and-true-p org-habit-show-habits))
+		     (and (not today?)
+			  (bound-and-true-p
+			   org-habit-show-habits-only-for-today))))
+	(throw :skip nil))
+      (save-excursion
+	(re-search-backward "^\\*+[ \t]+" nil t)
+	(goto-char (match-end 0))
+	(let* ((category (org-get-category))
+	       (inherited-tags
+		(or (eq org-agenda-show-inherited-tags 'always)
+		    (and (listp org-agenda-show-inherited-tags)
+			 (memq 'agenda org-agenda-show-inherited-tags))
+		    (and (eq org-agenda-show-inherited-tags t)
+			 (or (eq org-agenda-use-tag-inheritance t)
+			     (memq 'agenda
+				   org-agenda-use-tag-inheritance)))))
+	       (tags (org-get-tags-at nil (not inherited-tags)))
+	       (level (make-string (org-reduced-level (org-outline-level))
+				   ?\s))
+	       (head (buffer-substring (point) (line-end-position)))
+	       (time
+		(cond
+		 ;; No time of day designation if it is only
+		 ;; a reminder.
+		 ((and (/= current schedule) (/= current repeat)) nil)
+		 ((string-match " \\([012]?[0-9]:[0-9][0-9]\\)" base)
+		  (concat (substring base (match-beginning 1)) " "))
+		 (t 'time)))
+	       (item
+		(org-agenda-format-item
+		 (pcase-let ((`(,first ,past) org-agenda-scheduled-leaders))
+		   ;; Show a reminder of a past scheduled today.
+		   (if (and today? pastschedp)
+		       (format past diff)
+		     first))
+		 head level category tags time nil habit?))
+	       (face (cond ((and (not habit?) pastschedp)
+			    'org-scheduled-previously)
+			   (today? 'org-scheduled-today)
+			   (t 'org-scheduled)))
+	       (habit? (and habit? (org-habit-parse-todo))))
+	  (org-add-props item nil
+	    'date (if pastschedp schedule date)
+	    'done-face 'org-agenda-done
+	    'face (if done? 'org-agenda-done face)
+	    'help-echo (format "mouse-2 or RET jump to Org file %S"
+			       (abbreviate-file-name
+				(buffer-file-name (buffer-base-buffer))))
+	    'level level
+	    'mouse-face 'highlight
+	    'org-complex-heading-regexp org-complex-heading-regexp
+	    'org-habit-p habit?
+	    'org-hd-marker (org-agenda-new-marker (line-beginning-position))
+	    'org-marker (org-agenda-new-marker pos)
+	    'org-not-done-regexp org-not-done-regexp
+	    'org-todo-regexp org-todo-regexp
+	    'priority (if habit? (org-habit-get-priority habit?)
+			(+ 99 diff (org-get-priority item)))
+	    'todo-state todo-state
+	    'ts-date schedule
+	    'type (if pastschedp "past-scheduled" "scheduled")
+	    'undone-face face
+	    'warntime warntime))))))
+
+(defun org-agenda--entry-from-timestamp (date datum deadlines)
+  "Return agenda entry for DATE associated to a time-stamp.
+
+DATE is a list of the form (MONTH DAY YEAR).  DATUM is a list of
+the form (POS timestamp TIMESTAMP) where POS is the location of
+string TIMESTAMP, a time-stamp.  DEADLINES is a list of positions
+for deadlines displayed in the agenda.
+
+Throw `:skip' if no entry is associated to DATUM at DATE.  Leave
+point past entries that should be ignored."
+  (pcase-let ((`(,pos ,_ ,time-stamp) datum))
+    (goto-char pos)
+    (org-agenda-skip)
+    (let ((current (calendar-absolute-from-gregorian date))
+	  (todo-state (org-get-todo-state)))
+      (cond
+       ((and org-agenda-skip-timestamp-if-done
+	     (member todo-state org-done-keywords))
+	;; Possibly skip DONE tasks.
+	(throw :skip nil))
+       ((string-prefix-p "<%%" time-stamp) ;S-exp timestamp
+	(unless (org-diary-sexp-entry time-stamp "" date)
+	  ;; S-exp entry doesn't match current day: skip it.
+	  (throw :skip nil)))
+       ((org-get-repeat time-stamp)	;time-stamp with a repeater
+	(let* ((today (org-today))
+	       (past
+		;; A repeating time stamp is shown at its base date
+		;; and every repeated date up to TODAY.  If
+		;; `org-agenda-prefer-last-repeat' is non-nil,
+		;; however, only the last repeat before today
+		;; (inclusive) is shown.
+		(org-agenda--timestamp-to-absolute
+		 time-stamp
+		 (if (or (> current today)
+			 (eq org-agenda-prefer-last-repeat t)
+			 (member todo-state org-agenda-prefer-last-repeat))
+		     today
+		   current)
+		 'past (current-buffer) pos))
+	       (future
+		;;  Display every repeated date past TODAY (exclusive)
+		;;  unless `org-agenda-show-future-repeats' is nil.
+		;;  If this variable is set to `next', only display
+		;;  the first repeated date after TODAY (exclusive).
+		(cond
+		 ((<= current today) past)
+		 ((not org-agenda-show-future-repeats) past)
+		 (t
+		  (let ((base (if (eq org-agenda-show-future-repeats 'next)
+				  (1+ today)
+				current)))
+		    (org-agenda--timestamp-to-absolute
+		     time-stamp base 'future (current-buffer) pos))))))
+	  (when (and (/= current past) (/= current future))
+	    (throw :skip nil))))
+       (t				;plain time-stamp
+	(pcase-let ((`(,month ,day ,year) date))
+	  (unless (string-prefix-p (format "<%d-%02d-%02d" year month day)
+				   time-stamp)
+	    (throw :skip nil)))))
+      (save-excursion
+	(re-search-backward org-outline-regexp-bol nil t)
+	;; Possibly skip time-stamp when a deadline is set.
+	(when (and org-agenda-skip-timestamp-if-deadline-is-shown
+		   (assq (point) deadlines))
+	  (throw :skip nil))
+	(when org-agenda-skip-additional-timestamps-same-entry
+	  (push `(timestamp . ,(org-entry-end-position))
+		org-agenda--skip-position))
+	(let* ((category (org-get-category pos))
+	       (inherited-tags
+		(or (eq org-agenda-show-inherited-tags 'always)
+		    (and (consp org-agenda-show-inherited-tags)
+			 (memq 'agenda org-agenda-show-inherited-tags))
+		    (and (eq org-agenda-show-inherited-tags t)
+			 (or (eq org-agenda-use-tag-inheritance t)
+			     (memq 'agenda
+				   org-agenda-use-tag-inheritance)))))
+	       (tags (org-get-tags-at nil (not inherited-tags)))
+	       (level (make-string (org-reduced-level (org-outline-level))
+				   ?\s))
+	       (head (and (looking-at "\\*+[ \t]+\\(.*\\)")
+			  (match-string 1)))
+	       (habit? (and (fboundp 'org-is-habit-p) (org-is-habit-p)))
+	       (item (org-agenda-format-item
+		      nil head level category tags time-stamp org-ts-regexp
+		      habit?)))
+	  (org-add-props item nil
+	    'date date
+	    'face 'org-agenda-calendar-event
+	    'help-echo (format "mouse-2 or RET jump to Org file %S"
+			       (abbreviate-file-name
+				(buffer-file-name (buffer-base-buffer))))
+	    'level level
+	    'mouse-face 'highlight
+	    'org-complex-heading-regexp org-complex-heading-regexp
+	    'org-hd-marker (org-agenda-new-marker)
+	    'org-marker (org-agenda-new-marker pos)
+	    'org-not-done-regexp org-not-done-regexp
+	    'org-todo-regexp org-todo-regexp
+	    'priority (if habit?
+			  (org-habit-get-priority (org-habit-parse-todo))
+			(org-get-priority item))
+	    'todo-state todo-state
+	    'ts-date (if time-stamp
+			 (org-agenda--timestamp-to-absolute time-stamp)
+		       current)
+	    'type "timestamp"
+	    'warntime (get-text-property (point) 'org-appt-warntime)))))))
+
+(defun org-agenda--entry-from-todo (date data)
+  "Return diary entries for DATE associated to a diary S-exp entry.
+
+DATE is a list of the form (MONTH DAY YEAR).  DATA is a list of
+the form (POS todo TODO HEADLINE) where POS is the location of
+the headline, TODO its associated keyword and the full headline,
+as strings.
+
+Throw `:skip' if no entry is associated to DATA at DATE.  Leave
+point past entries that should be ignored."
+  (pcase-let ((`(,pos ,_ ,todo ,headline) data))
+    ;; Check if we skip current TODO keyword.
+    (cond ((equal org-select-this-todo-keyword "*")) ;accept all
+	  (org-select-this-todo-keyword
+	   (unless (member todo (split-string org-select-this-todo-keyword
+					      "|" t "[ \t]+"))
+	     (throw :skip nil)))
+	  ((member todo org-done-keywords) (throw :skip nil)))
+    (goto-char pos)
+    (let* ((scheduled (org-entry-get (point) "SCHEDULED"))
+	   (deadline (org-entry-get (point) "DEADLINE"))
+	   (timestamp (org-entry-get (point) "TIMESTAMP")))
+      (when (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item
+	     scheduled deadline timestamp)
+	(throw :skip nil))
+      (org-agenda-skip)
+      (unless org-agenda-todo-list-sublevels
+	(push `(todo . ,(save-excursion (org-end-of-subtree t t)))
+	      org-agenda--skip-position))
+      (let* ((category (org-get-category))
+	     (marker (org-agenda-new-marker))
+	     (ts-date-pair (org-agenda-entry-get-agenda-timestamp
+			    scheduled deadline timestamp))
+	     (ts-date (car ts-date-pair))
+	     (ts-date-type (cdr ts-date-pair))
+	     (inherited-tags
+	      (or (eq org-agenda-show-inherited-tags 'always)
+		  (and (listp org-agenda-show-inherited-tags)
+		       (memq 'todo org-agenda-show-inherited-tags))
+		  (and (eq org-agenda-show-inherited-tags t)
+		       (or (eq org-agenda-use-tag-inheritance t)
+			   (memq 'todo org-agenda-use-tag-inheritance)))))
+	     (tags (org-get-tags-at nil (not inherited-tags)))
+	     (level (make-string (org-reduced-level (org-outline-level))
+				 ?\s))
+	     (priority (1+ (org-get-priority headline)))
+	     (item (org-agenda-format-item "" headline level category tags t)))
+	(org-add-props item nil
+	  'done-face 'org-agenda-done
+	  'face nil
+	  'help-echo (format "mouse-2 or RET jump to Org file %S"
+			     (abbreviate-file-name
+			      (buffer-file-name (buffer-base-buffer))))
+	  'level level
+	  'mouse-face 'highlight
+	  'org-complex-heading-regexp org-complex-heading-regexp
+	  'org-hd-marker marker
+	  'org-marker marker
+	  'org-not-done-regexp org-not-done-regexp
+	  'org-todo-regexp org-todo-regexp
+	  'priority priority
+	  'todo-state todo
+	  'ts-date ts-date
+	  'type (concat "todo" ts-date-type))))))
+
 (defvar org-agenda-buffer-tmp-name nil)
+
 ;;;###autoload
 (defun org-agenda-list (&optional arg start-day span with-hour)
   "Produce a daily/weekly view from all files in variable `org-agenda-files'.
@@ -4117,7 +5072,7 @@ items if they have an hour specification like [h]h:mm."
     (org-agenda-prepare "Day/Week")
     (setq start-day (or start-day org-agenda-start-day))
     (if (stringp start-day)
-	;; Convert to an absolute day number
+	;; Convert to an absolute day number.
 	(setq start-day (time-to-days (org-read-date nil t start-day))))
     (org-compile-prefix-format 'agenda)
     (org-set-sorting-strategy 'agenda)
@@ -4128,8 +5083,7 @@ items if they have an hour specification like [h]h:mm."
 	   (org-agenda-start-on-weekday
 	    (if (or (eq ndays 7) (eq ndays 14))
 		org-agenda-start-on-weekday))
-	   (thefiles (org-agenda-files nil 'ifmode))
-	   (files thefiles)
+	   (files (org-agenda-files nil 'ifmode))
 	   (start (if (or (null org-agenda-start-on-weekday)
 			  (< ndays 7))
 		      sd
@@ -4138,17 +5092,12 @@ items if they have an hour specification like [h]h:mm."
 			   (n1 org-agenda-start-on-weekday)
 			   (d (- nt n1)))
 		      (- sd (+ (if (< d 0) 7 0) d)))))
-	   (day-numbers (list start))
+	   (day-numbers (number-sequence start (+ start (1- ndays))))
 	   (day-cnt 0)
 	   (inhibit-redisplay (not debug-on-error))
-	   (org-agenda-show-log-scoped org-agenda-show-log)
-	   s e rtn rtnall file date d start-pos end-pos todayp
-	   clocktable-start clocktable-end filter)
+	   date start-pos end-pos clocktable-start clocktable-end filter)
       (setq org-agenda-redo-command
 	    (list 'org-agenda-list (list 'quote arg) start-day (list 'quote span) with-hour))
-      (dotimes (n (1- ndays))
-	(push (1+ (car day-numbers)) day-numbers))
-      (setq day-numbers (nreverse day-numbers))
       (setq clocktable-start (car day-numbers)
 	    clocktable-end (1+ (or (org-last day-numbers) 0)))
       (setq-local org-starting-day (car day-numbers))
@@ -4158,8 +5107,8 @@ items if they have an hour specification like [h]h:mm."
 	(let* ((d1 (car day-numbers))
 	       (d2 (org-last day-numbers))
 	       (w1 (org-days-to-iso-week d1))
-	       (w2 (org-days-to-iso-week d2)))
-	  (setq s (point))
+	       (w2 (org-days-to-iso-week d2))
+	       (s (point)))
 	  (if org-agenda-overriding-header
 	      (insert (org-add-props (copy-sequence org-agenda-overriding-header)
 			  nil 'face 'org-agenda-structure) "\n")
@@ -4170,114 +5119,92 @@ items if they have an hour specification like [h]h:mm."
 			    (format " (W%02d)" w1)
 			  (format " (W%02d-W%02d)" w1 w2))
 		      "")
-		    ":\n")))
-	(add-text-properties s (1- (point)) (list 'face 'org-agenda-structure
-						  'org-date-line t))
-	(org-agenda-mark-header-line s))
-      (while (setq d (pop day-numbers))
-	(setq date (calendar-gregorian-from-absolute d)
-	      s (point))
-	(if (or (setq todayp (= d today))
-		(and (not start-pos) (= d sd)))
-	    (setq start-pos (point))
-	  (if (and start-pos (not end-pos))
-	      (setq end-pos (point))))
-	(setq files thefiles
-	      rtnall nil)
-	(while (setq file (pop files))
-	  (catch 'nextfile
-	    (org-check-agenda-file file)
-	    (let ((org-agenda-entry-types org-agenda-entry-types))
-	      ;; Starred types override non-starred equivalents
-	      (when (member :deadline* org-agenda-entry-types)
-		(setq org-agenda-entry-types
-		      (delq :deadline org-agenda-entry-types)))
-	      (when (member :scheduled* org-agenda-entry-types)
-		(setq org-agenda-entry-types
-		      (delq :scheduled org-agenda-entry-types)))
-	      ;; Honor with-hour
-	      (when with-hour
-		(when (member :deadline org-agenda-entry-types)
-		  (setq org-agenda-entry-types
-			(delq :deadline org-agenda-entry-types))
-		  (push :deadline* org-agenda-entry-types))
-		(when (member :scheduled org-agenda-entry-types)
-		  (setq org-agenda-entry-types
-			(delq :scheduled org-agenda-entry-types))
-		  (push :scheduled* org-agenda-entry-types)))
-	      (unless org-agenda-include-deadlines
-		(setq org-agenda-entry-types
-		      (delq :deadline* (delq :deadline org-agenda-entry-types))))
-	      (cond
-	       ((memq org-agenda-show-log-scoped '(only clockcheck))
-		(setq rtn (org-agenda-get-day-entries
-			   file date :closed)))
-	       (org-agenda-show-log-scoped
-		(setq rtn (apply 'org-agenda-get-day-entries
-				 file date
-				 (append '(:closed) org-agenda-entry-types))))
-	       (t
-		(setq rtn (apply 'org-agenda-get-day-entries
-				 file date
-				 org-agenda-entry-types)))))
-	    (setq rtnall (append rtnall rtn)))) ;; all entries
-	(if org-agenda-include-diary
-	    (let ((org-agenda-search-headline-for-time t))
-	      (require 'diary-lib)
-	      (setq rtn (org-get-entries-from-diary date))
-	      (setq rtnall (append rtnall rtn))))
-	(if (or rtnall org-agenda-show-all-dates)
-	    (progn
-	      (setq day-cnt (1+ day-cnt))
-	      (insert
-	       (if (stringp org-agenda-format-date)
-		   (format-time-string org-agenda-format-date
-				       (org-time-from-absolute date))
-		 (funcall org-agenda-format-date date))
-	       "\n")
-	      (put-text-property s (1- (point)) 'face
-				 (org-agenda-get-day-face date))
-	      (put-text-property s (1- (point)) 'org-date-line t)
-	      (put-text-property s (1- (point)) 'org-agenda-date-header t)
-	      (put-text-property s (1- (point)) 'org-day-cnt day-cnt)
-	      (when todayp
-		(put-text-property s (1- (point)) 'org-today t))
-	      (setq rtnall
-		    (org-agenda-add-time-grid-maybe rtnall ndays todayp))
-	      (if rtnall (insert ;; all entries
-			  (org-agenda-finalize-entries rtnall 'agenda)
-			  "\n"))
+		    ":\n"))
+	  (add-text-properties s (1- (point)) (list 'face 'org-agenda-structure
+						    'org-date-line t))
+	  (org-agenda-mark-header-line s)))
+      (let* ((types (cond
+		     ((memq org-agenda-show-log '(only clockcheck))
+		      org-agenda-log-mode-items)
+		     (org-agenda-show-log
+		      (append org-agenda-log-mode-items org-agenda-entry-types))
+		     (t org-agenda-entry-types)))
+	     ;; Collect all necessary agenda-related data once.
+	     (data (delq nil
+			 (mapcar (lambda (f)
+				   (catch 'nextfile
+				     (org-check-agenda-file f)
+				     (cons f
+					   (org-agenda--file-data f types))))
+				 files))))
+	(dolist (d day-numbers)
+	  (let ((date (calendar-gregorian-from-absolute d))
+		(today? (= d today))
+		(s (point))
+		(all-entries nil))
+	    (cond ((or today? (and (not start-pos) (= d sd)))
+		   (setq start-pos (point)))
+		  ((and start-pos (not end-pos))
+		   (setq end-pos (point)))
+		  (t nil))
+	    (pcase-dolist (`(,file . ,items) data)
+	      (setq all-entries
+		    (append (apply #'org-agenda-day-entries
+				   date file items types)
+			    all-entries)))
+	    (when org-agenda-include-diary
+	      (let ((org-agenda-search-headline-for-time t))
+		(require 'diary-lib)
+		(setq all-entries
+		      (append all-entries (org-get-entries-from-diary date)))))
+	    (when (or all-entries org-agenda-show-all-dates)
+	      (cl-incf day-cnt)
+	      (insert (if (stringp org-agenda-format-date)
+			  (format-time-string org-agenda-format-date
+					      (org-time-from-absolute date))
+			(funcall org-agenda-format-date date))
+		      "\n")
+	      (add-text-properties s (1- (point))
+				   (list 'face (org-agenda-get-day-face date)
+					 'org-date-line t
+					 'org-agenda-date-header t
+					 'org-day-cnt day-cnt))
+	      (when today? (put-text-property s (1- (point)) 'org-today t))
+	      (setq all-entries
+		    (org-agenda-add-time-grid-maybe all-entries ndays today?))
+	      (when all-entries
+		(insert (org-agenda-finalize-entries all-entries 'agenda)
+			"\n"))
 	      (put-text-property s (1- (point)) 'day d)
-	      (put-text-property s (1- (point)) 'org-day-cnt day-cnt))))
+	      (put-text-property s (1- (point)) 'org-day-cnt day-cnt)))))
       (when (and org-agenda-clockreport-mode clocktable-start)
-	(let ((org-agenda-files (org-agenda-files nil 'ifmode))
-	      ;; the above line is to ensure the restricted range!
-	      (p (copy-sequence org-agenda-clockreport-parameter-plist))
-	      tbl)
-	  (setq p (org-plist-delete p :block))
-	  (setq p (plist-put p :tstart clocktable-start))
-	  (setq p (plist-put p :tend clocktable-end))
-	  (setq p (plist-put p :scope 'agenda))
-	  (setq tbl (apply 'org-clock-get-clocktable p))
-	  (insert tbl)))
+	(let ((org-agenda-files (org-agenda-files nil 'ifmode)))
+	  ;; The above line is to ensure the restricted range!
+	  (insert
+	   (apply #'org-clock-get-clocktable
+		  (org-combine-plists org-agenda-clockreport-parameter-plist
+				      (list :block nil
+					    :tstart clocktable-start
+					    :tend clocktable-end
+					    :scope 'agenda))))))
       (goto-char (point-min))
-      (or org-agenda-multi (org-agenda-fit-window-to-buffer))
+      (unless org-agenda-multi (org-agenda-fit-window-to-buffer))
       (unless (and (pos-visible-in-window-p (point-min))
 		   (pos-visible-in-window-p (point-max)))
 	(goto-char (1- (point-max)))
 	(recenter -1)
-	(if (not (pos-visible-in-window-p (or start-pos 1)))
-	    (progn
-	      (goto-char (or start-pos 1))
-	      (recenter 1))))
+	(unless (pos-visible-in-window-p (or start-pos 1))
+	  (goto-char (or start-pos 1))
+	  (recenter 1)))
       (goto-char (or start-pos 1))
-      (add-text-properties (point-min) (point-max)
-			   `(org-agenda-type agenda
-					     org-last-args (,arg ,start-day ,span)
-					     org-redo-cmd ,org-agenda-redo-command
-					     org-series-cmd ,org-cmd))
-      (if (eq org-agenda-show-log-scoped 'clockcheck)
-	  (org-agenda-show-clocking-issues))
+      (add-text-properties
+       (point-min) (point-max)
+       `(org-agenda-type agenda
+			 org-last-args (,arg ,start-day ,span)
+			 org-redo-cmd ,org-agenda-redo-command
+			 org-series-cmd ,org-cmd))
+      (when (eq org-agenda-show-log 'clockcheck)
+	(org-agenda-show-clocking-issues))
       (org-agenda-finalize)
       (setq buffer-read-only t)
       (message ""))))
@@ -4627,9 +5554,6 @@ Press `\\[org-agenda-manipulate-query-add]', \
       "|"))
    "\n"))
 
-(defvar org-select-this-todo-keyword nil)
-(defvar org-last-arg nil)
-
 ;;;###autoload
 (defun org-todo-list (&optional arg)
   "Show all (not done) TODO entries from all agenda file in a single list.
@@ -4649,7 +5573,7 @@ for a keyword.  A numeric prefix directly selects the Nth keyword in
 	  (if (stringp arg) arg
 	    (and arg (integerp arg) (> arg 0)
                  (nth (1- arg) kwds))))
-	 rtn rtnall files file pos)
+	 pos)
     (when (equal arg '(4))
       (setq org-select-this-todo-keyword
 	    (completing-read "Keyword (or KWD1|K2D2|...): "
@@ -4670,41 +5594,44 @@ for a keyword.  A numeric prefix directly selects the Nth keyword in
 				     current-prefix-arg)
 				,org-select-this-todo-keyword
 				current-prefix-arg ,arg)))
-      (setq files (org-agenda-files nil 'ifmode)
-	    rtnall nil)
-      (while (setq file (pop files))
-	(catch 'nextfile
-	  (org-check-agenda-file file)
-	  (setq rtn (org-agenda-get-day-entries file date :todo))
-	  (setq rtnall (append rtnall rtn))))
-      (if org-agenda-overriding-header
-	  (insert (org-add-props (copy-sequence org-agenda-overriding-header)
-		      nil 'face 'org-agenda-structure) "\n")
-	(insert "Global list of TODO items of type: ")
-	(add-text-properties (point-min) (1- (point))
-			     (list 'face 'org-agenda-structure
-				   'short-heading
-				   (concat "ToDo: "
-					   (or org-select-this-todo-keyword "ALL"))))
-	(org-agenda-mark-header-line (point-min))
-	(insert (org-agenda-propertize-selected-todo-keywords
-		 org-select-this-todo-keyword))
-	(setq pos (point))
-	(unless org-agenda-multi
-	  (insert (substitute-command-keys "Available with \
+      (let ((all-entries nil))
+	(dolist (file (org-agenda-files nil 'ifmode))
+	  (catch 'nextfile
+	    (org-check-agenda-file file)
+	    (let ((items (org-agenda--file-data file '(:todo))))
+	      (setq all-entries
+		    (append all-entries
+			    (org-agenda-day-entries date file items :todo))))))
+	(if org-agenda-overriding-header
+	    (insert (org-add-props (copy-sequence org-agenda-overriding-header)
+			nil 'face 'org-agenda-structure) "\n")
+	  (insert "Global list of TODO items of type: ")
+	  (add-text-properties (point-min) (1- (point))
+			       (list 'face 'org-agenda-structure
+				     'short-heading
+				     (concat "ToDo: "
+					     (or org-select-this-todo-keyword
+						 "ALL"))))
+	  (org-agenda-mark-header-line (point-min))
+	  (insert (org-agenda-propertize-selected-todo-keywords
+		   org-select-this-todo-keyword))
+	  (setq pos (point))
+	  (unless org-agenda-multi
+	    (insert (substitute-command-keys "Available with \
 `N \\[org-agenda-redo]': (0)[ALL]"))
-	  (let ((n 0) s)
-	    (mapc (lambda (x)
-		    (setq s (format "(%d)%s" (setq n (1+ n)) x))
-		    (if (> (+ (current-column) (string-width s) 1) (frame-width))
-			(insert "\n                     "))
-		    (insert " " s))
-		  kwds))
-	  (insert "\n"))
-	(add-text-properties pos (1- (point)) (list 'face 'org-agenda-structure)))
-      (org-agenda-mark-header-line (point-min))
-      (when rtnall
-	(insert (org-agenda-finalize-entries rtnall 'todo) "\n"))
+	    (let ((n 0))
+	      (dolist (k kwds)
+		(let ((s (format "(%d)%s" (cl-incf n) k)))
+		  (if (> (+ (current-column) (string-width s) 1)
+			 (frame-width))
+		      (insert "\n                     "))
+		  (insert " " s))))
+	    (insert "\n"))
+	  (add-text-properties pos (1- (point))
+			       (list 'face 'org-agenda-structure)))
+	(org-agenda-mark-header-line (point-min))
+	(when all-entries
+	  (insert (org-agenda-finalize-entries all-entries 'todo) "\n")))
       (goto-char (point-min))
       (or org-agenda-multi (org-agenda-fit-window-to-buffer))
       (add-text-properties (point-min) (point-max)
@@ -5129,62 +6056,62 @@ Needed to avoid empty dates which mess up holiday display."
 
 ;;;###autoload
 (defun org-diary (&rest args)
-  "Return diary information from org files.
+  "Return diary information from Org files.
 This function can be used in a \"sexp\" diary entry in the Emacs calendar.
-It accesses org files and extracts information from those files to be
+It accesses Org files and extracts information from those files to be
 listed in the diary.  The function accepts arguments specifying what
 items should be listed.  For a list of arguments allowed here, see the
 variable `org-agenda-entry-types'.
 
 The call in the diary file should look like this:
 
-   &%%(org-diary) ~/path/to/some/orgfile.org
+   %%(org-diary) ~/path/to/some/orgfile.org
 
-Use a separate line for each org file to check.  Or, if you omit the file name,
+Use a separate line for each Org file to check.  Or, if you omit the file name,
 all files listed in `org-agenda-files' will be checked automatically:
 
-   &%%(org-diary)
+   %%(org-diary)
 
 If you don't give any arguments (as in the example above), the default value
 of `org-agenda-entry-types' is used: (:deadline :scheduled :timestamp :sexp).
 So the example above may also be written as
 
-   &%%(org-diary :deadline :timestamp :sexp :scheduled)
+   %%(org-diary :deadline :timestamp :sexp :scheduled)
 
 The function expects the lisp variables `entry' and `date' to be provided
 by the caller, because this is how the calendar works.  Don't use this
-function from a program - use `org-agenda-get-day-entries' instead."
-  (when (> (- (float-time)
-	      org-agenda-last-marker-time)
-	   5)
-    ;; I am not sure if this works with sticky agendas, because the marker
-    ;; list is then no longer a global variable.
+function from a program - use `org-agenda-day-entries' instead."
+  (when (<= 5 (- org-agenda-last-marker-time (float-time)))
+    ;; I am not sure if this works with sticky agendas, because the
+    ;; marker list is then no longer a global variable.
     (org-agenda-reset-markers))
   (org-compile-prefix-format 'agenda)
   (org-set-sorting-strategy 'agenda)
   (setq args (or args org-agenda-entry-types))
-  (let* ((files (if (and entry (stringp entry) (string-match "\\S-" entry))
-		    (list entry)
-		  (org-agenda-files t)))
-	 (time (float-time))
-	 file rtn results)
+  (let ((time (float-time))
+	(files (if (org-string-nw-p entry) (list entry)
+		 (org-agenda-files t))))
     (when (or (not org-diary-last-run-time)
-	      (> (- time
-		    org-diary-last-run-time)
-		 3))
+	      (<= 3 (- time org-diary-last-run-time)))
       (org-agenda-prepare-buffers files))
     (setq org-diary-last-run-time time)
-    ;; If this is called during org-agenda, don't return any entries to
-    ;; the calendar.  Org Agenda will list these entries itself.
-    (if org-disable-agenda-to-diary (setq files nil))
-    (while (setq file (pop files))
-      (setq rtn (apply 'org-agenda-get-day-entries file date args))
-      (setq results (append results rtn)))
-    (when results
-      (setq results
-	    (mapcar (lambda (i) (replace-regexp-in-string
-				 org-bracket-link-regexp "\\3" i)) results))
-      (concat (org-agenda-finalize-entries results) "\n"))))
+    ;; If this is called during `org-agenda', don't return any entries
+    ;; to the calendar.  Org Agenda will list these entries itself.
+    (unless org-disable-agenda-to-diary
+      (let ((entries nil))
+	(dolist (file files)
+	  (let ((items (org-agenda--file-data file args)))
+	    (setq entries
+		  (append entries
+			  (apply #'org-agenda-day-entries
+				 date file items args)))))
+	(when entries
+	  (concat (org-agenda-finalize-entries
+		   (mapcar (lambda (i)
+			     (replace-regexp-in-string
+			      org-bracket-link-regexp "\\3" i))
+			   entries))
+		  "\n"))))))
 
 ;;; Agenda entry finders
 
@@ -5198,67 +6125,85 @@ However, throw `:skip' whenever an error is raised."
      (message "%s; Skipping entry" (error-message-string e))
      (throw :skip nil))))
 
-(defun org-agenda-get-day-entries (file date &rest args)
-  "Does the work for `org-diary' and `org-agenda'.
-FILE is the path to a file to be checked for entries.  DATE is date like
-the one returned by `calendar-current-date'.  ARGS are symbols indicating
-which kind of entries should be extracted.  For details about these, see
-the documentation of `org-diary'."
-  (let* ((org-startup-folded nil)
-	 (org-startup-align-all-tables nil)
-	 (buffer (if (file-exists-p file) (org-get-agenda-file-buffer file)
-		   (error "No such file %s" file))))
-    (if (not buffer)
-	;; If file does not exist, signal it in diary nonetheless.
-	(list (format "ORG-AGENDA-ERROR: No such org-file %s" file))
-      (with-current-buffer buffer
-	(unless (derived-mode-p 'org-mode)
-	  (error "Agenda file %s is not in `org-mode'" file))
-	(setq org-agenda-buffer (or org-agenda-buffer buffer))
-	(setf org-agenda-current-date date)
-	(save-excursion
-	  (save-restriction
-	    (if (eq buffer org-agenda-restrict)
-		(narrow-to-region org-agenda-restrict-begin
-				  org-agenda-restrict-end)
-	      (widen))
-	    ;; Rationalize ARGS.  Also make sure `:deadline' comes
-	    ;; first in order to populate DEADLINES before passing it.
-	    ;;
-	    ;; We use `delq' since `org-uniquify' duplicates ARGS,
-	    ;; guarding us from modifying `org-agenda-entry-types'.
-	    (setf args (org-uniquify (or args org-agenda-entry-types)))
-	    (when (and (memq :scheduled args) (memq :scheduled* args))
-	      (setf args (delq :scheduled* args)))
-	    (cond
-	     ((memq :deadline args)
-	      (setf args (cons :deadline
-			       (delq :deadline (delq :deadline* args)))))
-	     ((memq :deadline* args)
-	      (setf args (cons :deadline* (delq :deadline* args)))))
-	    ;; Collect list of headlines.  Return them flattened.
-	    (let ((case-fold-search nil) results deadlines)
-	      (dolist (arg args (apply #'nconc (nreverse results)))
-		(pcase arg
-		  ((and :todo (guard (org-agenda-today-p date)))
-		   (push (org-agenda-get-todos) results))
-		  (:timestamp
-		   (push (org-agenda-get-blocks) results)
-		   (push (org-agenda-get-timestamps deadlines) results))
-		  (:sexp
-		   (push (org-agenda-get-sexps) results))
-		  (:scheduled
-		   (push (org-agenda-get-scheduled deadlines) results))
-		  (:scheduled*
-		   (push (org-agenda-get-scheduled deadlines t) results))
-		  (:closed
-		   (push (org-agenda-get-progress) results))
-		  (:deadline
-		   (setf deadlines (org-agenda-get-deadlines))
-		   (push deadlines results))
-		  (:deadline*
-		   (setf deadlines (org-agenda-get-deadlines t))
-		   (push deadlines results)))))))))))
+(defun org-agenda-day-entries (date file data &rest types)
+  "Return a list of agenda entries for DATE in FILE.
+DATE is date like the one returned by `calendar-current-date'.
+FILE is the filename containing the data.  DATA is the data to
+process, as returned by `org-agenda--file-data'.  TYPES are
+keywords indicating which kind of entries should be extracted."
+  (setf org-agenda-current-date date)
+  (let* ((with-hours? (or (memq :deadline* types)
+			  (memq :scheduled* types)))
+	 (deadline? (and org-agenda-include-deadlines
+			 (or (memq :deadline types)
+			     (memq :deadline* types))))
+	 (scheduled? (or (memq :scheduled types)
+			 (memq :scheduled* types)))
+	 (today? (org-agenda-today-p date)))
+    (with-current-buffer (org-get-agenda-file-buffer file)
+      ;; Get deadline entries first since the information is needed in
+      ;; other entries converters.
+      (org-with-point-at 1
+	(let* ((deadline-entries
+		(and deadline?
+		     (delq nil
+			   (mapcar (lambda (datum)
+				     (catch :skip
+				       (and (eq 'deadline (nth 1 datum))
+					    (org-agenda--entry-from-deadline
+					     date datum with-hours?))))
+				   data))))
+	       (deadline-positions
+		(mapcar (lambda (d)
+			  (let ((m (get-text-property 0 'org-hd-marker d)))
+			    (and m (marker-position m))))
+			deadline-entries))
+	       (org-agenda--skip-position nil)
+	       (results nil))
+	  (dolist (datum data)
+	    (catch :skip
+	      (pcase-let* ((`(,pos ,type . ,_) datum)
+			   (skip-pos
+			    (let ((p (cdr (assq type
+						org-agenda--skip-position))))
+			      (if p (max p (point)) (point)))))
+		(pcase type
+		  ((guard (< pos skip-pos))
+		   ;; Calling `:skip' possibly moved point past the
+		   ;; region to ignore.  Since data is ordered, it
+		   ;; means we have to ignore every element before
+		   ;; point.  We also need to obey specific skip
+		   ;; conditions in `org-agenda--skip-position'.
+		   nil)
+		  (`diary
+		   ;; Unlike other converters,
+		   ;; `org-agenda--entry-from-diary' returns a list
+		   ;; of entries instead of a single entry.
+		   (setq results
+			 (nconc (org-agenda--entry-from-diary date datum)
+				results)))
+		  ((or `clock `closed `state)
+		   (push (org-agenda--entry-from-log date datum)
+			 results))
+		  (`deadline nil)	;already done
+		  (`range
+		   (push (org-agenda--entry-from-range date datum)
+			 results))
+		  (`scheduled
+		   (when scheduled?
+		     (push (org-agenda--entry-from-scheduled
+			    date datum deadline-positions with-hours?)
+			   results)))
+		  (`timestamp
+		   (push (org-agenda--entry-from-timestamp
+			  date datum deadline-positions)
+			 results))
+		  (`todo
+		   (when today?
+		     (push (org-agenda--entry-from-todo date datum)
+			   results)))
+		  (_ (error "Unknown agenda entry type: %S" type))))))
+	  (nconc deadline-entries results))))))
 
 (defsubst org-em (x y list)
   "Is X or Y a member of LIST?"
@@ -5267,112 +6212,47 @@ the documentation of `org-diary'."
 (defvar org-heading-keyword-regexp-format) ; defined in org.el
 (defvar org-agenda-sorting-strategy-selected nil)
 
-(defun org-agenda-entry-get-agenda-timestamp (pom)
+(defun org-agenda-entry-get-agenda-timestamp
+    (&optional scheduled deadline timestamp)
   "Retrieve timestamp information for sorting agenda views.
-Given a point or marker POM, returns a cons cell of the timestamp
-and the timestamp type relevant for the sorting strategy in
-`org-agenda-sorting-strategy-selected'."
-  (let (ts ts-date-type)
+
+Optional arguments SCHEDULED, DEADLINE and TIMESTAMP are,
+respectively, the scheduled, deadline, and first timestamp in the
+entry, or nil.
+
+Return a cons cell (VALUE . TYPE) of the timestamp and the
+timestamp type relevant for the sorting strategy in
+`org-agenda-sorting-strategy-selected'.
+
+The function doesn't change match data."
+  (let ((value nil)
+	(type nil))
     (save-match-data
       (cond ((org-em 'scheduled-up 'scheduled-down
 		     org-agenda-sorting-strategy-selected)
-	     (setq ts (org-entry-get pom "SCHEDULED")
-		   ts-date-type " scheduled"))
+	     (setq value (or scheduled (org-entry-get (point) "SCHEDULED")))
+	     (setq type " scheduled"))
 	    ((org-em 'deadline-up 'deadline-down
 		     org-agenda-sorting-strategy-selected)
-	     (setq ts (org-entry-get pom "DEADLINE")
-		   ts-date-type " deadline"))
+	     (setq value (or deadline (org-entry-get (point) "DEADLINE")))
+	     (setq type " deadline"))
 	    ((org-em 'ts-up 'ts-down
 		     org-agenda-sorting-strategy-selected)
-	     (setq ts (org-entry-get pom "TIMESTAMP")
-		   ts-date-type " timestamp"))
+	     (setq value (or timestamp (org-entry-get (point) "TIMESTAMP")))
+	     (setq type " timestamp"))
 	    ((org-em 'tsia-up 'tsia-down
 		     org-agenda-sorting-strategy-selected)
-	     (setq ts (org-entry-get pom "TIMESTAMP_IA")
-		   ts-date-type " timestamp_ia"))
+	     (setq value (org-entry-get (point) "TIMESTAMP_IA"))
+	     (setq type " timestamp_ia"))
 	    ((org-em 'timestamp-up 'timestamp-down
 		     org-agenda-sorting-strategy-selected)
-	     (setq ts (or (org-entry-get pom "SCHEDULED")
-			  (org-entry-get pom "DEADLINE")
-			  (org-entry-get pom "TIMESTAMP")
-			  (org-entry-get pom "TIMESTAMP_IA"))
-		   ts-date-type ""))
-	    (t (setq ts-date-type "")))
-      (cons (when ts (ignore-errors (org-time-string-to-absolute ts)))
-	    ts-date-type))))
-
-(defun org-agenda-get-todos ()
-  "Return the TODO information for agenda display."
-  (let* ((props (list 'face nil
-		      'done-face 'org-agenda-done
-		      'org-not-done-regexp org-not-done-regexp
-		      'org-todo-regexp org-todo-regexp
-		      'org-complex-heading-regexp org-complex-heading-regexp
-		      'mouse-face 'highlight
-		      'help-echo
-		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
-	 (case-fold-search nil)
-	 (regexp (format org-heading-keyword-regexp-format
-			 (cond
-			  ((and org-select-this-todo-keyword
-				(equal org-select-this-todo-keyword "*"))
-			   org-todo-regexp)
-			  (org-select-this-todo-keyword
-			   (concat "\\("
-				   (mapconcat 'identity
-					      (org-split-string
-					       org-select-this-todo-keyword
-					       "|")
-					      "\\|") "\\)"))
-			  (t org-not-done-regexp))))
-	 marker priority category level tags todo-state
-	 ts-date ts-date-type ts-date-pair
-	 ee txt beg end inherited-tags todo-state-end-pos)
-    (goto-char (point-min))
-    (while (re-search-forward regexp nil t)
-      (catch :skip
-	(save-match-data
-	  (beginning-of-line)
-	  (org-agenda-skip)
-	  (setq beg (point) end (save-excursion (outline-next-heading) (point)))
-	  (unless (and (setq todo-state (org-get-todo-state))
-		       (setq todo-state-end-pos (match-end 2)))
-	    (goto-char end)
-	    (throw :skip nil))
-	  (when (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item end)
-	    (goto-char (1+ beg))
-	    (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
-	    (throw :skip nil)))
-	(goto-char (match-beginning 2))
-	(setq marker (org-agenda-new-marker (match-beginning 0))
-	      category (org-get-category)
-	      ts-date-pair (org-agenda-entry-get-agenda-timestamp (point))
-	      ts-date (car ts-date-pair)
-	      ts-date-type (cdr ts-date-pair)
-	      txt (org-trim (buffer-substring (match-beginning 2) (match-end 0)))
-	      inherited-tags
-	      (or (eq org-agenda-show-inherited-tags 'always)
-		  (and (listp org-agenda-show-inherited-tags)
-		       (memq 'todo org-agenda-show-inherited-tags))
-		  (and (eq org-agenda-show-inherited-tags t)
-		       (or (eq org-agenda-use-tag-inheritance t)
-			   (memq 'todo org-agenda-use-tag-inheritance))))
-	      tags (org-get-tags-at nil (not inherited-tags))
-	      level (make-string (org-reduced-level (org-outline-level)) ? )
-	      txt (org-agenda-format-item "" txt level category tags t)
-	      priority (1+ (org-get-priority txt)))
-	(org-add-props txt props
-	  'org-marker marker 'org-hd-marker marker
-	  'priority priority
-	  'level level
-	  'ts-date ts-date
-	  'type (concat "todo" ts-date-type) 'todo-state todo-state)
-	(push txt ee)
-	(if org-agenda-todo-list-sublevels
-	    (goto-char todo-state-end-pos)
-	  (org-end-of-subtree 'invisible))))
-    (nreverse ee)))
+	     (setq value (or scheduled (org-entry-get (point) "SCHEDULED")
+			     deadline (org-entry-get (point) "DEADLINE")
+			     timestamp (org-entry-get (point) "TIMESTAMP")
+			     (org-entry-get (point) "TIMESTAMP_IA")))
+	     (setq value "")))
+      (cons (and value (ignore-errors (org-time-string-to-absolute value)))
+	    type))))
 
 (defun org-agenda-todo-custom-ignore-p (time n)
   "Check whether timestamp is farther away than n number of days.
@@ -5387,272 +6267,80 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
 
 ;;;###autoload
 (defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item
-    (&optional end)
-  "Do we have a reason to ignore this TODO entry because it has a time stamp?"
-  (when (or org-agenda-todo-ignore-with-date
-	    org-agenda-todo-ignore-scheduled
-	    org-agenda-todo-ignore-deadlines
-	    org-agenda-todo-ignore-timestamp)
-    (setq end (or end (save-excursion (outline-next-heading) (point))))
-    (save-excursion
-      (or (and org-agenda-todo-ignore-with-date
-	       (re-search-forward org-ts-regexp end t))
-	  (and org-agenda-todo-ignore-scheduled
-	       (re-search-forward org-scheduled-time-regexp end t)
-	       (cond
-		((eq org-agenda-todo-ignore-scheduled 'future)
-		 (> (org-time-stamp-to-now
-		     (match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds) 0))
-		((eq org-agenda-todo-ignore-scheduled 'past)
-		 (<= (org-time-stamp-to-now
-		      (match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds) 0))
-		((numberp org-agenda-todo-ignore-scheduled)
-		 (org-agenda-todo-custom-ignore-p
-		  (match-string 1) org-agenda-todo-ignore-scheduled))
-		(t)))
-	  (and org-agenda-todo-ignore-deadlines
-	       (re-search-forward org-deadline-time-regexp end t)
-	       (cond
-		((memq org-agenda-todo-ignore-deadlines '(t all)) t)
-		((eq org-agenda-todo-ignore-deadlines 'far)
-		 (not (org-deadline-close-p (match-string 1))))
-		((eq org-agenda-todo-ignore-deadlines 'future)
-		 (> (org-time-stamp-to-now
-		     (match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds) 0))
-		((eq org-agenda-todo-ignore-deadlines 'past)
-		 (<= (org-time-stamp-to-now
-		      (match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds) 0))
-		((numberp org-agenda-todo-ignore-deadlines)
-		 (org-agenda-todo-custom-ignore-p
-		  (match-string 1) org-agenda-todo-ignore-deadlines))
-		(t (org-deadline-close-p (match-string 1)))))
-	  (and org-agenda-todo-ignore-timestamp
-	       (let ((buffer (current-buffer))
-		     (regexp
-		      (concat
-		       org-scheduled-time-regexp "\\|" org-deadline-time-regexp))
-		     (start (point)))
-		 ;; Copy current buffer into a temporary one
-		 (with-temp-buffer
-		   (insert-buffer-substring buffer start end)
-		   (goto-char (point-min))
-		   ;; Delete SCHEDULED and DEADLINE items
-		   (while (re-search-forward regexp end t)
-		     (delete-region (match-beginning 0) (match-end 0)))
-		   (goto-char (point-min))
-		   ;; No search for timestamp left
-		   (when (re-search-forward org-ts-regexp nil t)
-		     (cond
-		      ((eq org-agenda-todo-ignore-timestamp 'future)
-		       (> (org-time-stamp-to-now
-			   (match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds) 0))
-		      ((eq org-agenda-todo-ignore-timestamp 'past)
-		       (<= (org-time-stamp-to-now
-			    (match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds) 0))
-		      ((numberp org-agenda-todo-ignore-timestamp)
-		       (org-agenda-todo-custom-ignore-p
-			(match-string 1) org-agenda-todo-ignore-timestamp))
-		      (t))))))))))
-
-(defun org-agenda-get-timestamps (&optional deadlines)
-  "Return the date stamp information for agenda display.
-Optional argument DEADLINES is a list of deadline items to be
-displayed in agenda view."
-  (let* ((props (list 'face 'org-agenda-calendar-event
-		      'org-not-done-regexp org-not-done-regexp
-		      'org-todo-regexp org-todo-regexp
-		      'org-complex-heading-regexp org-complex-heading-regexp
-		      'mouse-face 'highlight
-		      'help-echo
-		      (format "mouse-2 or RET jump to Org file %s"
-			      (abbreviate-file-name buffer-file-name))))
-	 (current (calendar-absolute-from-gregorian date))
-	 (today (org-today))
-	 (deadline-position-alist
-	  (mapcar (lambda (d)
-		    (let ((m (get-text-property 0 'org-hd-marker d)))
-		      (and m (marker-position m))))
-		  deadlines))
-	 ;; Match time-stamps set to current date, time-stamps with
-	 ;; a repeater, and S-exp time-stamps.
-	 (regexp
-	  (concat
-	   (if org-agenda-include-inactive-timestamps "[[<]" "<")
-	   (regexp-quote
-	    (substring
-	     (format-time-string
-	      (car org-time-stamp-formats)
-	      (apply #'encode-time	; DATE bound by calendar
-		     (list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
-	     1 11))
-	   "\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[hdwmy]>\\)"
-	   "\\|\\(<%%\\(([^>\n]+)\\)>\\)"))
-	 timestamp-items)
-    (goto-char (point-min))
-    (while (re-search-forward regexp nil t)
-      ;; Skip date ranges, scheduled and deadlines, which are handled
-      ;; specially.  Also skip time-stamps before first headline as
-      ;; there would be no entry to add to the agenda.  Eventually,
-      ;; ignore clock entries.
-      (catch :skip
-	(save-match-data
-	  (when (or (org-at-date-range-p)
-		    (org-at-planning-p)
-		    (org-before-first-heading-p)
-		    (and org-agenda-include-inactive-timestamps
-			 (org-at-clock-log-p)))
-	    (throw :skip nil))
-	  (org-agenda-skip))
-	(let* ((pos (match-beginning 0))
-	       (repeat (match-string 1))
-	       (sexp-entry (match-string 3))
-	       (time-stamp (if (or repeat sexp-entry) (match-string 0)
-			     (save-excursion
-			       (goto-char pos)
-			       (looking-at org-ts-regexp-both)
-			       (match-string 0))))
-	       (todo-state (org-get-todo-state))
-	       (warntime (get-text-property (point) 'org-appt-warntime))
-	       (done? (member todo-state org-done-keywords)))
-	  ;; Possibly skip done tasks.
-	  (when (and done? org-agenda-skip-timestamp-if-done)
-	    (throw :skip t))
-	  ;; S-exp entry doesn't match current day: skip it.
-	  (when (and sexp-entry (not (org-diary-sexp-entry sexp-entry "" date)))
-	    (throw :skip nil))
-	  (when repeat
-	    (let* ((past
-		    ;; A repeating time stamp is shown at its base
-		    ;; date and every repeated date up to TODAY.  If
-		    ;; `org-agenda-prefer-last-repeat' is non-nil,
-		    ;; however, only the last repeat before today
-		    ;; (inclusive) is shown.
-		    (org-agenda--timestamp-to-absolute
-		     repeat
-		     (if (or (> current today)
-			     (eq org-agenda-prefer-last-repeat t)
-			     (member todo-state org-agenda-prefer-last-repeat))
-			 today
-		       current)
-		     'past (current-buffer) pos))
-		   (future
-		    ;;  Display every repeated date past TODAY
-		    ;;  (exclusive) unless
-		    ;;  `org-agenda-show-future-repeats' is nil.  If
-		    ;;  this variable is set to `next', only display
-		    ;;  the first repeated date after TODAY
-		    ;;  (exclusive).
-		    (cond
-		     ((<= current today) past)
-		     ((not org-agenda-show-future-repeats) past)
-		     (t
-		      (let ((base (if (eq org-agenda-show-future-repeats 'next)
-				      (1+ today)
-				    current)))
-			(org-agenda--timestamp-to-absolute
-			 repeat base 'future (current-buffer) pos))))))
-	      (when (and (/= current past) (/= current future))
-		(throw :skip nil))))
-	  (save-excursion
-	    (re-search-backward org-outline-regexp-bol nil t)
-	    ;; Possibly skip time-stamp when a deadline is set.
-	    (when (and org-agenda-skip-timestamp-if-deadline-is-shown
-		       (assq (point) deadline-position-alist))
-	      (throw :skip nil))
-	    (let* ((category (org-get-category pos))
-		   (inherited-tags
-		    (or (eq org-agenda-show-inherited-tags 'always)
-			(and (consp org-agenda-show-inherited-tags)
-			     (memq 'agenda org-agenda-show-inherited-tags))
-			(and (eq org-agenda-show-inherited-tags t)
-			     (or (eq org-agenda-use-tag-inheritance t)
-				 (memq 'agenda
-				       org-agenda-use-tag-inheritance)))))
-		   (tags (org-get-tags-at nil (not inherited-tags)))
-		   (level (make-string (org-reduced-level (org-outline-level))
-				       ?\s))
-		   (head (and (looking-at "\\*+[ \t]+\\(.*\\)")
-			      (match-string 1)))
-		   (inactive? (= (char-after pos) ?\[))
-		   (habit? (and (fboundp 'org-is-habit-p) (org-is-habit-p)))
-		   (item
-		    (org-agenda-format-item
-		     (and inactive? org-agenda-inactive-leader)
-		     head level category tags time-stamp org-ts-regexp habit?)))
-	      (org-add-props item props
-		'priority (if habit?
-			      (org-habit-get-priority (org-habit-parse-todo))
-			    (org-get-priority item))
-		'org-marker (org-agenda-new-marker pos)
-		'org-hd-marker (org-agenda-new-marker)
-		'date date
-		'level level
-		'ts-date (if repeat (org-agenda--timestamp-to-absolute repeat)
-			   current)
-		'todo-state todo-state
-		'warntime warntime
-		'type "timestamp")
-	      (push item timestamp-items))))
-	(when org-agenda-skip-additional-timestamps-same-entry
-	  (outline-next-heading))))
-    (nreverse timestamp-items)))
-
-(defun org-agenda-get-sexps ()
-  "Return the sexp information for agenda display."
-  (require 'diary-lib)
-  (let* ((props (list 'face 'org-agenda-calendar-sexp
-		      'mouse-face 'highlight
-		      'help-echo
-		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
-	 (regexp "^&?%%(")
-	 marker category extra level ee txt tags entry
-	 result beg b sexp sexp-entry todo-state warntime inherited-tags)
-    (goto-char (point-min))
-    (while (re-search-forward regexp nil t)
-      (catch :skip
-	(org-agenda-skip)
-	(setq beg (match-beginning 0))
-	(goto-char (1- (match-end 0)))
-	(setq b (point))
-	(forward-sexp 1)
-	(setq sexp (buffer-substring b (point)))
-	(setq sexp-entry (if (looking-at "[ \t]*\\(\\S-.*\\)")
-			     (org-trim (match-string 1))
-			   ""))
-	(setq result (org-diary-sexp-entry sexp sexp-entry date))
-	(when result
-	  (setq marker (org-agenda-new-marker beg)
-		level (make-string (org-reduced-level (org-outline-level)) ? )
-		category (org-get-category beg)
-		inherited-tags
-		(or (eq org-agenda-show-inherited-tags 'always)
-		    (and (listp org-agenda-show-inherited-tags)
-			 (memq 'agenda org-agenda-show-inherited-tags))
-		    (and (eq org-agenda-show-inherited-tags t)
-			 (or (eq org-agenda-use-tag-inheritance t)
-			     (memq 'agenda org-agenda-use-tag-inheritance))))
-		tags (org-get-tags-at nil (not inherited-tags))
-		todo-state (org-get-todo-state)
-		warntime (get-text-property (point) 'org-appt-warntime)
-		extra nil)
-
-	  (dolist (r (if (stringp result)
-			 (list result)
-		       result)) ;; we expect a list here
-	    (when (and org-agenda-diary-sexp-prefix
-		       (string-match org-agenda-diary-sexp-prefix r))
-	      (setq extra (match-string 0 r)
-		    r (replace-match "" nil nil r)))
-	    (if (string-match "\\S-" r)
-		(setq txt r)
-	      (setq txt "SEXP entry returned empty string"))
-	    (setq txt (org-agenda-format-item extra txt level category tags 'time))
-	    (org-add-props txt props 'org-marker marker
-			   'date date 'todo-state todo-state
-			   'level level 'type "sexp" 'warntime warntime)
-	    (push txt ee)))))
-    (nreverse ee)))
+    (&optional scheduled deadline timestamp)
+  "Non-nil if this TODO entry is to be ignored because of a time stamp.
+Optional arguments SCHEDULED, DEADLINE and TIMESTAMP are,
+respectively, the scheduled, deadline, and first timestamp in the
+entry, or nil."
+  (let ((scheduled (or scheduled (org-entry-get (point) "SCHEDULED")))
+	(deadline (or deadline (org-entry-get (point) "DEADLINE")))
+	(timestamp (or timestamp (org-entry-get (point) "TIMESTAMP"))))
+    (catch :ignore
+      (when (and org-agenda-todo-ignore-with-date
+		 (or scheduled deadline timestamp))
+	(throw :ignore t))
+      (when (and scheduled org-agenda-todo-ignore-scheduled)
+	(pcase org-agenda-todo-ignore-scheduled
+	  (`future
+	   (when (> (org-time-stamp-to-now
+		     scheduled
+		     org-agenda-todo-ignore-time-comparison-use-seconds)
+		    0)
+	     (throw :ignore t)))
+	  (`past
+	   (when (<= (org-time-stamp-to-now
+		      scheduled
+		      org-agenda-todo-ignore-time-comparison-use-seconds)
+		     0)
+	     (throw :ignore t)))
+	  ((pred numberp)
+	   (org-agenda-todo-custom-ignore-p scheduled
+					    org-agenda-todo-ignore-scheduled))
+	  (_ (throw :ignore t))))
+      (when (and deadline org-agenda-todo-ignore-deadlines)
+	(pcase org-agenda-todo-ignore-deadlines
+	  ((or `t `all) (throw :ignore t))
+	  (`far
+	   (when (not (org-deadline-close-p deadline))
+	     (throw :ignore t)))
+	  (`future
+	   (when (> (org-time-stamp-to-now
+		     deadline
+		     org-agenda-todo-ignore-time-comparison-use-seconds)
+		    0)
+	     (throw :ignore t)))
+	  (`past
+	   (when (<= (org-time-stamp-to-now
+		      deadline
+		      org-agenda-todo-ignore-time-comparison-use-seconds)
+		     0)
+	     (throw :ignore t)))
+	  ((pred numberp)
+	   (when (org-agenda-todo-custom-ignore-p
+		  deadline org-agenda-todo-ignore-deadlines)
+	     (throw :ignore t)))
+	  (_
+	   (when (org-deadline-close-p deadline) (throw :ignore t)))))
+      (when (and timestamp org-agenda-todo-ignore-timestamp)
+	(pcase org-agenda-todo-ignore-timestamp
+	  (`future
+	   (when (> (org-time-stamp-to-now
+		     timestamp
+		     org-agenda-todo-ignore-time-comparison-use-seconds)
+		    0)
+	     (throw :ignore t)))
+	  (`past
+	   (when (<= (org-time-stamp-to-now
+		      timestamp
+		      org-agenda-todo-ignore-time-comparison-use-seconds)
+		     0)
+	     (throw :ignore t)))
+	  ((pred numberp)
+	   (org-agenda-todo-custom-ignore-p timestamp
+					    org-agenda-todo-ignore-timestamp))
+	  (_ (throw :ignore t))))
+      ;; No reason. Move on.
+      nil)))
 
 ;; Calendar sanity: define some functions that are independent of
 ;; `calendar-date-style'.
@@ -5702,110 +6390,6 @@ then those holidays will be skipped."
 	      (delq nil (mapcar (lambda(g) (member g skip-weeks)) h))))
      entry)))
 
-(defalias 'org-get-closed 'org-agenda-get-progress)
-(defun org-agenda-get-progress ()
-  "Return the logged TODO entries for agenda display."
-  (let* ((props (list 'mouse-face 'highlight
-		      'org-not-done-regexp org-not-done-regexp
-		      'org-todo-regexp org-todo-regexp
-		      'org-complex-heading-regexp org-complex-heading-regexp
-		      'help-echo
-		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
-	 (items (if (consp org-agenda-show-log-scoped)
-		    org-agenda-show-log-scoped
-		  (if (eq org-agenda-show-log-scoped 'clockcheck)
-		      '(clock)
-		    org-agenda-log-mode-items)))
-	 (parts
-	  (delq nil
-		(list
-		 (if (memq 'closed items) (concat "\\<" org-closed-string))
-		 (if (memq 'clock items) (concat "\\<" org-clock-string))
-		 (if (memq 'state items) "- State \"\\([a-zA-Z0-9]+\\)\".*?"))))
-	 (parts-re (if parts (mapconcat 'identity parts "\\|")
-		     (error "`org-agenda-log-mode-items' is empty")))
-	 (regexp (concat
-		  "\\(" parts-re "\\)"
-		  " *\\["
-		  (regexp-quote
-		   (substring
-		    (format-time-string
-		     (car org-time-stamp-formats)
-		     (apply 'encode-time  ; DATE bound by calendar
-			    (list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
-		    1 11))))
-	 (org-agenda-search-headline-for-time nil)
-	 marker hdmarker priority category level tags closedp
-	 statep clockp state ee txt extra timestr rest clocked inherited-tags)
-    (goto-char (point-min))
-    (while (re-search-forward regexp nil t)
-      (catch :skip
-	(org-agenda-skip)
-	(setq marker (org-agenda-new-marker (match-beginning 0))
-	      closedp (equal (match-string 1) org-closed-string)
-	      statep (equal (string-to-char (match-string 1)) ?-)
-	      clockp (not (or closedp statep))
-	      state (and statep (match-string 2))
-	      category (org-get-category (match-beginning 0))
-	      timestr (buffer-substring (match-beginning 0) (point-at-eol)))
-	(when (string-match "\\]" timestr)
-	  ;; substring should only run to end of time stamp
-	  (setq rest (substring timestr (match-end 0))
-		timestr (substring timestr 0 (match-end 0)))
-	  (if (and (not closedp) (not statep)
-		   (string-match "\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)\\].*?\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)"
-				 rest))
-	      (progn (setq timestr (concat (substring timestr 0 -1)
-					   "-" (match-string 1 rest) "]"))
-		     (setq clocked (match-string 2 rest)))
-	    (setq clocked "-")))
-	(save-excursion
-	  (setq extra
-		(cond
-		 ((not org-agenda-log-mode-add-notes) nil)
-		 (statep
-		  (and (looking-at ".*\\\\\n[ \t]*\\([^-\n \t].*?\\)[ \t]*$")
-		       (match-string 1)))
-		 (clockp
-		  (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$")
-		       (match-string 1)))))
-	  (if (not (re-search-backward org-outline-regexp-bol nil t))
-	      (throw :skip nil)
-	    (goto-char (match-beginning 0))
-	    (setq hdmarker (org-agenda-new-marker)
-		  inherited-tags
-		  (or (eq org-agenda-show-inherited-tags 'always)
-		      (and (listp org-agenda-show-inherited-tags)
-			   (memq 'todo org-agenda-show-inherited-tags))
-		      (and (eq org-agenda-show-inherited-tags t)
-			   (or (eq org-agenda-use-tag-inheritance t)
-			       (memq 'todo org-agenda-use-tag-inheritance))))
-		  tags (org-get-tags-at nil (not inherited-tags))
-		  level (make-string (org-reduced-level (org-outline-level)) ? ))
-	    (looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
-	    (setq txt (match-string 1))
-	    (when extra
-	      (if (string-match "\\([ \t]+\\)\\(:[^ \n\t]*?:\\)[ \t]*$" txt)
-		  (setq txt (concat (substring txt 0 (match-beginning 1))
-				    " - " extra " " (match-string 2 txt)))
-		(setq txt (concat txt " - " extra))))
-	    (setq txt (org-agenda-format-item
-		       (cond
-			(closedp "Closed:    ")
-			(statep (concat "State:     (" state ")"))
-			(t (concat "Clocked:   (" clocked  ")")))
-		       txt level category tags timestr)))
-	  (setq priority 100000)
-	  (org-add-props txt props
-	    'org-marker marker 'org-hd-marker hdmarker 'face 'org-agenda-done
-	    'priority priority 'level level
-	    'type "closed" 'date date
-	    'undone-face 'org-warning 'done-face 'org-agenda-done)
-	  (push txt ee))
-	(goto-char (point-at-eol))))
-    (nreverse ee)))
-
 (defun org-agenda-show-clocking-issues ()
   "Add overlays, showing issues with clocking.
 See also the user option `org-agenda-clock-consistency-checks'."
@@ -5923,457 +6507,13 @@ See also the user option `org-agenda-clock-consistency-checks'."
       ;; Nope, this gap is not OK
       nil)))
 
-(defun org-agenda-get-deadlines (&optional with-hour)
-  "Return the deadline information for agenda display.
-When WITH-HOUR is non-nil, only return deadlines with an hour
-specification like [h]h:mm."
-  (let* ((props (list 'mouse-face 'highlight
-		      'org-not-done-regexp org-not-done-regexp
-		      'org-todo-regexp org-todo-regexp
-		      'org-complex-heading-regexp org-complex-heading-regexp
-		      'help-echo
-		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
-	 (regexp (if with-hour
-		     org-deadline-time-hour-regexp
-		   org-deadline-time-regexp))
-	 (today (org-today))
-	 (today? (org-agenda-today-p date)) ; DATE bound by calendar.
-	 (current (calendar-absolute-from-gregorian date))
-	 deadline-items)
-    (goto-char (point-min))
-    (while (re-search-forward regexp nil t)
-      (catch :skip
-	(unless (save-match-data (org-at-planning-p)) (throw :skip nil))
-	(org-agenda-skip)
-	(let* ((s (match-string 1))
-	       (pos (1- (match-beginning 1)))
-	       (todo-state (save-match-data (org-get-todo-state)))
-	       (done? (member todo-state org-done-keywords))
-               (sexp? (string-prefix-p "%%" s))
-	       ;; DEADLINE is the deadline date for the entry.  It is
-	       ;; either the base date or the last repeat, according
-	       ;; to `org-agenda-prefer-last-repeat'.
-	       (deadline
-		(cond
-		 (sexp? (org-agenda--timestamp-to-absolute s current))
-		 ((or (eq org-agenda-prefer-last-repeat t)
-		      (member todo-state org-agenda-prefer-last-repeat))
-		  (org-agenda--timestamp-to-absolute
-		   s today 'past (current-buffer) pos))
-		 (t (org-agenda--timestamp-to-absolute s))))
-	       ;; REPEAT is the future repeat closest from CURRENT,
-	       ;; according to `org-agenda-show-future-repeats'. If
-	       ;; the latter is nil, or if the time stamp has no
-	       ;; repeat part, default to DEADLINE.
-	       (repeat
-		(cond
-		 (sexp? deadline)
-		 ((<= current today) deadline)
-		 ((not org-agenda-show-future-repeats) deadline)
-		 (t
-		  (let ((base (if (eq org-agenda-show-future-repeats 'next)
-				  (1+ today)
-				current)))
-		    (org-agenda--timestamp-to-absolute
-		     s base 'future (current-buffer) pos)))))
-	       (diff (- deadline current))
-	       (suppress-prewarning
-		(let ((scheduled
-		       (and org-agenda-skip-deadline-prewarning-if-scheduled
-			    (org-entry-get nil "SCHEDULED"))))
-		  (cond
-		   ((not scheduled) nil)
-		   ;; The current item has a scheduled date, so
-		   ;; evaluate its prewarning lead time.
-		   ((integerp org-agenda-skip-deadline-prewarning-if-scheduled)
-		    ;; Use global prewarning-restart lead time.
-		    org-agenda-skip-deadline-prewarning-if-scheduled)
-		   ((eq org-agenda-skip-deadline-prewarning-if-scheduled
-			'pre-scheduled)
-		    ;; Set pre-warning to no earlier than SCHEDULED.
-		    (min (- deadline
-			    (org-agenda--timestamp-to-absolute scheduled))
-			 org-deadline-warning-days))
-		   ;; Set pre-warning to deadline.
-		   (t 0))))
-	       (wdays (if suppress-prewarning
-			  (let ((org-deadline-warning-days suppress-prewarning))
-			    (org-get-wdays s))
-			(org-get-wdays s))))
-	  (cond
-	   ;; Only display deadlines at their base date, at future
-	   ;; repeat occurrences or in today agenda.
-	   ((= current deadline) nil)
-	   ((= current repeat) nil)
-	   ((not today?) (throw :skip nil))
-	   ;; Upcoming deadline: display within warning period WDAYS.
-	   ((> deadline current) (when (> diff wdays) (throw :skip nil)))
-	   ;; Overdue deadline: warn about it for
-	   ;; `org-deadline-past-days' duration.
-	   (t (when (< org-deadline-past-days (- diff)) (throw :skip nil))))
-	  ;; Possibly skip done tasks.
-	  (when (and done?
-		     (or org-agenda-skip-deadline-if-done
-			 (/= deadline current)))
-	    (throw :skip nil))
-	  (save-excursion
-	    (re-search-backward "^\\*+[ \t]+" nil t)
-	    (goto-char (match-end 0))
-	    (let* ((category (org-get-category))
-		   (level (make-string (org-reduced-level (org-outline-level))
-				       ?\s))
-		   (head (buffer-substring (point) (line-end-position)))
-		   (inherited-tags
-		    (or (eq org-agenda-show-inherited-tags 'always)
-			(and (listp org-agenda-show-inherited-tags)
-			     (memq 'agenda org-agenda-show-inherited-tags))
-			(and (eq org-agenda-show-inherited-tags t)
-			     (or (eq org-agenda-use-tag-inheritance t)
-				 (memq 'agenda
-				       org-agenda-use-tag-inheritance)))))
-		   (tags (org-get-tags-at nil (not inherited-tags)))
-		   (time
-		    (cond
-		     ;; No time of day designation if it is only
-		     ;; a reminder.
-		     ((and (/= current deadline) (/= current repeat)) nil)
-		     ((string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s)
-		      (concat (substring s (match-beginning 1)) " "))
-		     (t 'time)))
-		   (item
-		    (org-agenda-format-item
-		     ;; Insert appropriate suffixes before deadlines.
-		     ;; Those only apply to today agenda.
-		     (pcase-let ((`(,now ,future ,past)
-				  org-agenda-deadline-leaders))
-		       (cond
-			((and today? (< deadline today)) (format past (- diff)))
-			((and today? (> deadline today)) (format future diff))
-			(t now)))
-		     head level category tags time))
-		   (face (org-agenda-deadline-face
-			  (- 1 (/ (float diff) (max wdays 1)))))
-		   (upcoming? (and today? (> deadline today)))
-		   (warntime (get-text-property (point) 'org-appt-warntime)))
-	      (org-add-props item props
-		'org-marker (org-agenda-new-marker pos)
-		'org-hd-marker (org-agenda-new-marker (line-beginning-position))
-		'warntime warntime
-		'level level
-		'ts-date deadline
-		'priority
-		;; Adjust priority to today reminders about deadlines.
-		;; Overdue deadlines get the highest priority
-		;; increase, then imminent deadlines and eventually
-		;; more distant deadlines.
-		(let ((adjust (if today? (- diff) 0)))
-		  (+ adjust (org-get-priority item)))
-		'todo-state todo-state
-		'type (if upcoming? "upcoming-deadline" "deadline")
-		'date (if upcoming? date deadline)
-		'face (if done? 'org-agenda-done face)
-		'undone-face face
-		'done-face 'org-agenda-done)
-	      (push item deadline-items))))))
-    (nreverse deadline-items)))
-
 (defun org-agenda-deadline-face (fraction)
   "Return the face to displaying a deadline item.
 FRACTION is what fraction of the head-warning time has passed."
   (assoc-default fraction org-agenda-deadline-faces #'<=))
 
-(defun org-agenda-get-scheduled (&optional deadlines with-hour)
-  "Return the scheduled information for agenda display.
-Optional argument DEADLINES is a list of deadline items to be
-displayed in agenda view.  When WITH-HOUR is non-nil, only return
-scheduled items with an hour specification like [h]h:mm."
-  (let* ((props (list 'org-not-done-regexp org-not-done-regexp
-		      'org-todo-regexp org-todo-regexp
-		      'org-complex-heading-regexp org-complex-heading-regexp
-		      'done-face 'org-agenda-done
-		      'mouse-face 'highlight
-		      'help-echo
-		      (format "mouse-2 or RET jump to Org file %s"
-			      (abbreviate-file-name buffer-file-name))))
-	 (regexp (if with-hour
-		     org-scheduled-time-hour-regexp
-		   org-scheduled-time-regexp))
-	 (today (org-today))
-	 (todayp (org-agenda-today-p date)) ; DATE bound by calendar.
-	 (current (calendar-absolute-from-gregorian date))
-	 (deadline-pos
-	  (mapcar (lambda (d)
-		    (let ((m (get-text-property 0 'org-hd-marker d)))
-		      (and m (marker-position m))))
-		  deadlines))
-	 scheduled-items)
-    (goto-char (point-min))
-    (while (re-search-forward regexp nil t)
-      (catch :skip
-	(unless (save-match-data (org-at-planning-p)) (throw :skip nil))
-	(org-agenda-skip)
-	(let* ((s (match-string 1))
-	       (pos (1- (match-beginning 1)))
-	       (todo-state (save-match-data (org-get-todo-state)))
-	       (donep (member todo-state org-done-keywords))
-	       (sexp? (string-prefix-p "%%" s))
-	       ;; SCHEDULE is the scheduled date for the entry.  It is
-	       ;; either the bare date or the last repeat, according
-	       ;; to `org-agenda-prefer-last-repeat'.
-	       (schedule
-		(cond
-		 (sexp? (org-agenda--timestamp-to-absolute s current))
-		 ((or (eq org-agenda-prefer-last-repeat t)
-		      (member todo-state org-agenda-prefer-last-repeat))
-		  (org-agenda--timestamp-to-absolute
-		   s today 'past (current-buffer) pos))
-		 (t (org-agenda--timestamp-to-absolute s))))
-	       ;; REPEAT is the future repeat closest from CURRENT,
-	       ;; according to `org-agenda-show-future-repeats'. If
-	       ;; the latter is nil, or if the time stamp has no
-	       ;; repeat part, default to SCHEDULE.
-	       (repeat
-		(cond
-		 (sexp? schedule)
-		 ((<= current today) schedule)
-		 ((not org-agenda-show-future-repeats) schedule)
-		 (t
-		  (let ((base (if (eq org-agenda-show-future-repeats 'next)
-				  (1+ today)
-				current)))
-		    (org-agenda--timestamp-to-absolute
-		     s base 'future (current-buffer) pos)))))
-	       (diff (- current schedule))
-	       (warntime (get-text-property (point) 'org-appt-warntime))
-	       (pastschedp (< schedule today))
-	       (habitp (and (fboundp 'org-is-habit-p) (org-is-habit-p)))
-	       (suppress-delay
-		(let ((deadline (and org-agenda-skip-scheduled-delay-if-deadline
-				     (org-entry-get nil "DEADLINE"))))
-		  (cond
-		   ((not deadline) nil)
-		   ;; The current item has a deadline date, so
-		   ;; evaluate its delay time.
-		   ((integerp org-agenda-skip-scheduled-delay-if-deadline)
-		    ;; Use global delay time.
-		    (- org-agenda-skip-scheduled-delay-if-deadline))
-		   ((eq org-agenda-skip-scheduled-delay-if-deadline
-			'post-deadline)
-		    ;; Set delay to no later than DEADLINE.
-		    (min (- schedule
-			    (org-agenda--timestamp-to-absolute deadline))
-			 org-scheduled-delay-days))
-		   (t 0))))
-	       (ddays
-		(cond
-		 ;; Nullify delay when a repeater triggered already
-		 ;; and the delay is of the form --Xd.
-		 ((and (string-match-p "--[0-9]+[hdwmy]" s)
-		       (> current schedule))
-		  0)
-		 (suppress-delay
-		  (let ((org-scheduled-delay-days suppress-delay))
-		    (org-get-wdays s t t)))
-		 (t (org-get-wdays s t)))))
-	  ;; Display scheduled items at base date (SCHEDULE), today if
-	  ;; scheduled before the current date, and at any repeat past
-	  ;; today.  However, skip delayed items and items that have
-	  ;; been displayed for more than `org-scheduled-past-days'.
-	  (unless (and todayp
-		       habitp
-		       (bound-and-true-p org-habit-show-all-today))
-	    (when (or (and (> ddays 0) (< diff ddays))
-		      (> diff org-scheduled-past-days)
-		      (> schedule current)
-		      (and (/= current schedule)
-			   (/= current today)
-			   (/= current repeat)))
-	      (throw :skip nil)))
-	  ;; Possibly skip done tasks.
-	  (when (and donep
-		     (or org-agenda-skip-scheduled-if-done
-			 (/= schedule current)))
-	    (throw :skip nil))
-	  ;; Skip entry if it already appears as a deadline, per
-	  ;; `org-agenda-skip-scheduled-if-deadline-is-shown'.  This
-	  ;; doesn't apply to habits.
-	  (when (pcase org-agenda-skip-scheduled-if-deadline-is-shown
-		  ((guard
-		    (or (not (memq (line-beginning-position 0) deadline-pos))
-			habitp))
-		   nil)
-		  (`repeated-after-deadline
-		   (let ((deadline (time-to-days
-				    (org-get-deadline-time (point)))))
-		     (and (<= schedule deadline) (> current deadline))))
-		  (`not-today pastschedp)
-		  (`t t)
-		  (_ nil))
-	    (throw :skip nil))
-	  ;; Skip habits if `org-habit-show-habits' is nil, or if we
-	  ;; only show them for today.  Also skip done habits.
-	  (when (and habitp
-		     (or donep
-			 (not (bound-and-true-p org-habit-show-habits))
-			 (and (not todayp)
-			      (bound-and-true-p
-			       org-habit-show-habits-only-for-today))))
-	    (throw :skip nil))
-	  (save-excursion
-	    (re-search-backward "^\\*+[ \t]+" nil t)
-	    (goto-char (match-end 0))
-	    (let* ((category (org-get-category))
-		   (inherited-tags
-		    (or (eq org-agenda-show-inherited-tags 'always)
-			(and (listp org-agenda-show-inherited-tags)
-			     (memq 'agenda org-agenda-show-inherited-tags))
-			(and (eq org-agenda-show-inherited-tags t)
-			     (or (eq org-agenda-use-tag-inheritance t)
-				 (memq 'agenda
-				       org-agenda-use-tag-inheritance)))))
-		   (tags (org-get-tags-at nil (not inherited-tags)))
-		   (level (make-string (org-reduced-level (org-outline-level))
-				       ?\s))
-		   (head (buffer-substring (point) (line-end-position)))
-		   (time
-		    (cond
-		     ;; No time of day designation if it is only
-		     ;; a reminder.
-		     ((and (/= current schedule) (/= current repeat)) nil)
-		     ((string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s)
-		      (concat (substring s (match-beginning 1)) " "))
-		     (t 'time)))
-		   (item
-		    (org-agenda-format-item
-		     (pcase-let ((`(,first ,past) org-agenda-scheduled-leaders))
-		       ;; Show a reminder of a past scheduled today.
-		       (if (and todayp pastschedp)
-			   (format past diff)
-			 first))
-		     head level category tags time nil habitp))
-		   (face (cond ((and (not habitp) pastschedp)
-				'org-scheduled-previously)
-			       (todayp 'org-scheduled-today)
-			       (t 'org-scheduled)))
-		   (habitp (and habitp (org-habit-parse-todo))))
-	      (org-add-props item props
-		'undone-face face
-		'face (if donep 'org-agenda-done face)
-		'org-marker (org-agenda-new-marker pos)
-		'org-hd-marker (org-agenda-new-marker (line-beginning-position))
-		'type (if pastschedp "past-scheduled" "scheduled")
-		'date (if pastschedp schedule date)
-		'ts-date schedule
-		'warntime warntime
-		'level level
-		'priority (if habitp (org-habit-get-priority habitp)
-			    (+ 99 diff (org-get-priority item)))
-		'org-habit-p habitp
-		'todo-state todo-state)
-	      (push item scheduled-items))))))
-    (nreverse scheduled-items)))
-
-(defun org-agenda-get-blocks ()
-  "Return the date-range information for agenda display."
-  (let* ((props (list 'face nil
-		      'org-not-done-regexp org-not-done-regexp
-		      'org-todo-regexp org-todo-regexp
-		      'org-complex-heading-regexp org-complex-heading-regexp
-		      'mouse-face 'highlight
-		      'help-echo
-		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
-	 (regexp org-tr-regexp)
-	 (d0 (calendar-absolute-from-gregorian date))
-	 marker hdmarker ee txt d1 d2 s1 s2 category
-	 level todo-state tags pos head donep inherited-tags)
-    (goto-char (point-min))
-    (while (re-search-forward regexp nil t)
-      (catch :skip
-	(org-agenda-skip)
-	(setq pos (point))
-	(let ((start-time (match-string 1))
-	      (end-time (match-string 2)))
-	  (setq s1 (match-string 1)
-		s2 (match-string 2)
-		d1 (time-to-days
-		    (condition-case err
-			(org-time-string-to-time s1)
-		      (error
-		       (error
-			"Bad timestamp %S at %d in buffer %S\nError was: %s"
-			s1
-			pos
-			(current-buffer)
-			(error-message-string err)))))
-		d2 (time-to-days
-		    (condition-case err
-			(org-time-string-to-time s2)
-		      (error
-		       (error
-			"Bad timestamp %S at %d in buffer %S\nError was: %s"
-			s2
-			pos
-			(current-buffer)
-			(error-message-string err))))))
-	  (if (and (> (- d0 d1) -1) (> (- d2 d0) -1))
-	      ;; Only allow days between the limits, because the normal
-	      ;; date stamps will catch the limits.
-	      (save-excursion
-		(setq todo-state (org-get-todo-state))
-		(setq donep (member todo-state org-done-keywords))
-		(if (and donep org-agenda-skip-timestamp-if-done)
-		    (throw :skip t))
-		(setq marker (org-agenda-new-marker (point))
-		      category (org-get-category))
-		(if (not (re-search-backward org-outline-regexp-bol nil t))
-		    (throw :skip nil)
-		  (goto-char (match-beginning 0))
-		  (setq hdmarker (org-agenda-new-marker (point))
-			inherited-tags
-			(or (eq org-agenda-show-inherited-tags 'always)
-			    (and (listp org-agenda-show-inherited-tags)
-				 (memq 'agenda org-agenda-show-inherited-tags))
-			    (and (eq org-agenda-show-inherited-tags t)
-				 (or (eq org-agenda-use-tag-inheritance t)
-				     (memq 'agenda org-agenda-use-tag-inheritance))))
-
-			tags (org-get-tags-at nil (not inherited-tags)))
-		  (setq level (make-string (org-reduced-level (org-outline-level)) ? ))
-		  (looking-at "\\*+[ \t]+\\(.*\\)")
-		  (setq head (match-string 1))
-		  (let ((remove-re
-			 (if org-agenda-remove-timeranges-from-blocks
-			     (concat
-			      "<" (regexp-quote s1) ".*?>"
-			      "--"
-			      "<" (regexp-quote s2) ".*?>")
-			   nil)))
-		    (setq txt (org-agenda-format-item
-			       (format
-				(nth (if (= d1 d2) 0 1)
-				     org-agenda-timerange-leaders)
-				(1+ (- d0 d1)) (1+ (- d2 d1)))
-			       head level category tags
-			       (cond ((and (= d1 d0) (= d2 d0))
-				      (concat "<" start-time ">--<" end-time ">"))
-                                     ((= d1 d0)
-				      (concat "<" start-time ">"))
-				     ((= d2 d0)
-				      (concat "<" end-time ">")))
-			       remove-re))))
-		(org-add-props txt props
-		  'org-marker marker 'org-hd-marker hdmarker
-		  'type "block" 'date date
-		  'level level
-		  'todo-state todo-state
-		  'priority (org-get-priority txt))
-		(push txt ee))))
-	(goto-char pos)))
-    ;; Sort the entries by expiration date.
-    (nreverse ee)))
 
+\f
 ;;; Agenda presentation and sorting
 
 (defvar org-prefix-has-time nil
@@ -8197,8 +8337,9 @@ log items, nothing else."
 	 ((equal special '(16)) 'only)
 	 ((eq special 'clockcheck)
 	  (if (eq org-agenda-show-log 'clockcheck)
-	      nil 'clockcheck))
-	 (special '(closed clock state))
+	      nil
+	    'clockcheck))
+	 (special '(:clock :closed :state))
 	 (t (not org-agenda-show-log))))
   (setq org-agenda-start-with-log-mode org-agenda-show-log)
   (org-agenda-set-mode-name)
@@ -10119,9 +10260,9 @@ expression, and filter out entries that don't match it.
 If FILTER is a string, use this string as a regular expression
 for filtering entries out.
 
-If FILTER is a function, filter out entries against which
-calling the function returns nil.  This function takes one
-argument: an entry from `org-agenda-get-day-entries'.
+If FILTER is a function, filter out entries against which calling
+the function returns nil.  This function takes one argument: an
+entry from `org-agenda-day-entries'.
 
 FILTER can also be an alist with the car of each cell being
 either `headline' or `category'.  For example:
@@ -10154,16 +10295,17 @@ to override `appt-message-warning-time'."
          (today (org-date-to-gregorian
                  (time-to-days (current-time))))
          (org-agenda-restrict nil)
-         (files (org-agenda-files 'unrestricted)) entries file
+	 (entries nil)
          (org-agenda-buffer nil))
     ;; Get all entries which may contain an appt
-    (org-agenda-prepare-buffers files)
-    (while (setq file (pop files))
-      (setq entries
-            (delq nil
-                  (append entries
-                          (apply 'org-agenda-get-day-entries
-                                 file today scope)))))
+    (let ((files (org-agenda-files 'unrestricted)))
+      (org-agenda-prepare-buffers files)
+      (dolist (file files)
+	(let ((items (org-agenda--file-data file scope)))
+	  (setq entries
+		(append entries
+			(apply #'org-agenda-day-entries
+			       today file items scope))))))
     ;; Map thru entries and find if we should filter them out
     (mapc
      (lambda (x)
diff --git a/lisp/org.el b/lisp/org.el
index 491649e2d..abd02d02f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4423,7 +4423,7 @@ This is needed for font-lock setup.")
 		  (newhead hdmarker &optional fixface just-this))
 (declare-function org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item
 		  "org-agenda"
-		  (&optional end))
+		  (&optional scheduled deadline timestamp))
 (declare-function org-agenda-copy-local-variable "org-agenda" (var))
 (declare-function org-agenda-format-item
 		  "org-agenda"
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 16:16 [ANN] Agenda speed up Nicolas Goaziou
@ 2017-08-27 16:22 ` Nicolas Goaziou
  2017-08-27 20:05 ` Samuel Wales
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-08-27 16:22 UTC (permalink / raw)
  To: Org Mode List

Completing myself:

Caveat: there's an incompatible change in `org-agenda-log-mode-items'.
You need to apply a trivial change to the values:

  closed -> :closed
  clock  -> :clock
  state  -> :state

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 16:16 [ANN] Agenda speed up Nicolas Goaziou
  2017-08-27 16:22 ` Nicolas Goaziou
@ 2017-08-27 20:05 ` Samuel Wales
  2017-08-31 17:17   ` Nicolas Goaziou
  2017-08-27 20:53 ` Russell Adams
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 42+ messages in thread
From: Samuel Wales @ 2017-08-27 20:05 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

On 8/27/17, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> I expect to see some interesting improvements when viewing the agenda
> with a span larger than one day, or when generating an agenda view
> without having touched most of the agenda files since last view.

wow, great!  i have long wanted this.

> The only thing that is expected to be defective is
> `org-agenda-include-inactive-timestamps'. It has no effect at the
> moment. I can activate it again, but I'm wondering if it's worth the
> overhead. It is already possible to display clocks and closed timestamps
> in the agenda. Other inactive timestamps could be ignored from the
> agenda altogether. This is their sole purpose, after all. WDYT?

totally disagree.  i totally rely on showing inactive timestamps.

in fact, i created a face for inactive timestamps.

i also do this:

(setq org-agenda-inactive-leader "Inactive:  ")

to better match Closed: and Clocked:.

i keep logs like this:

********* CONVERSATION [#C] [2017-01-28 Sat 20:16] org changed its
coloring for nokori, so past due shows tomorrow

which show up nicely.  in fact, sometimes i do:

***** DONEKEEP [2017-08-27 Sun 12:52] sent email

instead of doneifying.  showing closed tasks and donekeep at the same
time makes sense to me.

all of this keeps a record and can be sorted nicely in the outline
with visual binary search, much better than date trees for me.

i quite often will run agenda agenda on a restricted file, so that i
can get all active timestamps, and closed timestamps, and clocking
timestamps, and inactive timestamps for inside the restriction.  this
gets sorted correctly, by timestamp.

so i can see the active, closed, and clocking timestamps in context
with my notes.  that is totally key for me.  missing inactive
timestamps would violate the idea that i can bounce around the agenda
agenda at various dates to see what i did on those dates.  for
example, i go back 4 days to see what i did 4 days ago, and i see a
record of everything, including random insertions of inactive
timestamps, donekeep, conversation, closed, and clocked.  this feels
like an essential org feature to me.

i run agenda search also, to find relevant timestamps.  inactive are
much more common than active.

being able to see my logs with inactive timestamps in context with
active timestamps and closed timestamps and clocking is useful.

-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 16:16 [ANN] Agenda speed up Nicolas Goaziou
  2017-08-27 16:22 ` Nicolas Goaziou
  2017-08-27 20:05 ` Samuel Wales
@ 2017-08-27 20:53 ` Russell Adams
  2017-08-28  8:32   ` Colin Baxter
  2017-08-28 10:12 ` Eric S Fraga
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 42+ messages in thread
From: Russell Adams @ 2017-08-27 20:53 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, Aug 27, 2017 at 06:16:50PM +0200, Nicolas Goaziou wrote:
> Hello,
>
> I rewrote the part responsible for agenda generation in "org-agenda.el".
> Basically, I refactored some hot loops and introduced a cache mechanism
> for data extracted out of agenda files.

Sounds awesome.

> The only thing that is expected to be defective is
> `org-agenda-include-inactive-timestamps'. It has no effect at the
> moment. I can activate it again, but I'm wondering if it's worth the
> overhead. It is already possible to display clocks and closed timestamps
> in the agenda. Other inactive timestamps could be ignored from the
> agenda altogether. This is their sole purpose, after all. WDYT?

Count me in as another major user of inactive timestamps. I use active timestamps only for appointments, and when I'm
working on a task I constantly add inactive timestamps via single keypress macro. When I review what has happened in the
agenda, I only toggle on the inactives when I need to see them.

Professionally they have been lifesavers. When did I execute that command on that host? When did the user call? What
hours do I need to bill? Etc.

Please consider preserving the existing inactive timestamps functionality.




------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 20:53 ` Russell Adams
@ 2017-08-28  8:32   ` Colin Baxter
  0 siblings, 0 replies; 42+ messages in thread
From: Colin Baxter @ 2017-08-28  8:32 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> "Russell" == Russell Adams <RLAdams@AdamsInfoServ.Com> writes:

    Russell> On Sun, Aug 27, 2017 at 06:16:50PM +0200, Nicolas Goaziou
    Russell> wrote:
    >> Hello,
    >> 
    >> I rewrote the part responsible for agenda generation in
    >> "org-agenda.el".  Basically, I refactored some hot loops and
    >> introduced a cache mechanism for data extracted out of agenda
    >> files.

    Russell> Sounds awesome.

    >> The only thing that is expected to be defective is
    >> `org-agenda-include-inactive-timestamps'. It has no effect at the
    >> moment. I can activate it again, but I'm wondering if it's worth
    >> the overhead. It is already possible to display clocks and closed
    >> timestamps in the agenda. Other inactive timestamps could be
    >> ignored from the agenda altogether. This is their sole purpose,
    >> after all. WDYT?

--- snip ---

    Russell> Please consider preserving the existing inactive timestamps
    Russell> functionality.

I too find inactive timestamps to be extremely useful, and would like
the ability to use them in their present form to be preserved. For me,
they are one of the (many :-) great things about org-mode.

Best wishes,

-- 
--
Colin Baxter
m43cap@yandex.com
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 16:16 [ANN] Agenda speed up Nicolas Goaziou
                   ` (2 preceding siblings ...)
  2017-08-27 20:53 ` Russell Adams
@ 2017-08-28 10:12 ` Eric S Fraga
  2017-08-28 14:24   ` Nicolas Goaziou
  2017-09-29 20:45 ` Nicolas Goaziou
  2017-10-02  0:11 ` Matt Lundin
  5 siblings, 1 reply; 42+ messages in thread
From: Eric S Fraga @ 2017-08-28 10:12 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 3427 bytes --]

On Sunday, 27 Aug 2017 at 18:16, Nicolas Goaziou wrote:
> Hello,
>
> I rewrote the part responsible for agenda generation in "org-agenda.el".
> Basically, I refactored some hot loops and introduced a cache mechanism
> for data extracted out of agenda files.
>
> I expect to see some interesting improvements when viewing the agenda
> with a span larger than one day, or when generating an agenda view
> without having touched most of the agenda files since last view.
>
> Some feedback about the new agenda speed would be nice.

Dear Nicolas,

thank you for this.  Speeding up the agenda is something that appeals
given the complexity of my agenda and the often need to view weeks or
months.

I've compared timings old with new (from git a few minutes ago) by
starting up emacs, instrumenting package org, viewing agenda (defaults
to 1 day), switching to month view and then moving to the following
month:

Old agenda:

| org-agenda-list               |     3 | 19.770361111 | 6.5901203703 |
| org-agenda-redo               |     2 | 18.346457274 | 9.1732286370 |
| org-let                       |     2 | 16.772160558 |  8.386080279 |
| org-agenda-get-day-entries    |   768 | 15.158740033 | 0.0197379427 |
| org-agenda-get-scheduled      |   768 | 9.5280991699 | 0.0124063791 |
| org-agenda-later              |     1 |  9.455895455 |  9.455895455 |
| org-agenda-view-mode-dispatch |     1 |  9.181260158 |  9.181260158 |
| org-agenda-month-view         |     1 |  8.891024524 |  8.891024524 |
| org-agenda-change-time-span   |     1 |  8.891016702 |  8.891016702 |
| org-agenda-prepare-buffers    |     5 | 5.8218686260 | 1.1643737252 |
| org-agenda-prepare            |     3 | 4.4909116949 | 1.4969705649 |
| org-at-planning-p             | 38979 | 3.8525446340 | 9.883...e-05 |
| org-agenda                    |     1 |  3.198932055 |  3.198932055 |

New agenda:

| org-agenda-list               |      3 | 29.473988928 |  9.824662976 |
| org-agenda-redo               |      2 | 28.332199373 | 14.166099686 |
| org-let                       |      2 | 25.852282215 | 12.926141107 |
| org-agenda-day-entries        |    768 | 25.210189072 | 0.0328257670 |
| org-agenda-view-mode-dispatch |      1 | 14.441177311 | 14.441177311 |
| org-agenda-month-view         |      1 | 14.281358385 | 14.281358385 |
| org-agenda-change-time-span   |      1 | 14.281353565 | 14.281353565 |
| org-agenda-later              |      1 | 14.051216182 | 14.051216182 |
| org-back-to-heading           | 110331 | 9.5532106970 | 8.658...e-05 |
| org-get-todo-state            |  96677 | 9.5383469060 | 9.866...e-05 |
| org-agenda-skip               |  97251 | 8.0815792529 | 8.310...e-05 |
| org-agenda-prepare-buffers    |      5 | 5.7887248999 |   1.15774498 |
| org-agenda-prepare            |      3 |  4.180059331 | 1.3933531103 |
| org-agenda                    |      1 |  3.805856309 |  3.805856309 |
| org-agenda-to-appt            |      2 |  2.477811826 |  1.238905913 |
| org-get-agenda-file-buffer    |    888 | 1.8626567679 | 0.0020975864 |

I had to remove a bunch of <%% (...)> items in one of my agenda files as
these gave me error messages about the sexp.

Finally, most importantly, the actual items shown in the day view with
the new code are only a subset of those shown with the old view.  I
cannot see any pattern in those omitted.

Thanks again,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-28 10:12 ` Eric S Fraga
@ 2017-08-28 14:24   ` Nicolas Goaziou
  2017-08-29  6:52     ` Eric S Fraga
  2017-08-29  8:06     ` Eric S Fraga
  0 siblings, 2 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-08-28 14:24 UTC (permalink / raw)
  To: Org Mode List

Hello,

Eric S Fraga <esflists@gmail.com> writes:

> I've compared timings old with new (from git a few minutes ago) by
> starting up emacs, instrumenting package org, viewing agenda (defaults
> to 1 day), switching to month view and then moving to the following
> month:
>
> Old agenda:
>
> | org-agenda-list               |     3 | 19.770361111 | 6.5901203703 |

[...]

> New agenda:
>
> | org-agenda-list               |      3 | 29.473988928 |  9.824662976 |

How great! I managed to achieve a negative speed up.

> | org-agenda-skip               |  97251 | 8.0815792529 | 8.310...e-05 |

I overlooked `org-agenda-skip', which does nothing fancy on my side. It
is indeed called more often...

Skipping is actually harder with the cache, because you want to cache
everything anyway (or the cache cannot be trusted).

> I had to remove a bunch of <%% (...)> items in one of my agenda files as
> these gave me error messages about the sexp.

Could you show one of the culprits?

> Finally, most importantly, the actual items shown in the day view with
> the new code are only a subset of those shown with the old view.  I
> cannot see any pattern in those omitted.

There may be more than one pattern involved. Maybe the types involved
would help.

I updated the "wip-agenda-speedup" branch (rebasing needed). It should
now call `org-agenda-skip' less often. Could you try again using that?

Thank you for the feedback.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-28 14:24   ` Nicolas Goaziou
@ 2017-08-29  6:52     ` Eric S Fraga
  2017-08-29 15:56       ` Robert Horn
  2017-08-29  8:06     ` Eric S Fraga
  1 sibling, 1 reply; 42+ messages in thread
From: Eric S Fraga @ 2017-08-29  6:52 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

On Monday, 28 Aug 2017 at 16:24, Nicolas Goaziou wrote:
> How great! I managed to achieve a negative speed up.

:-)

Happens to me more often than I wish to admit to...

>> I had to remove a bunch of <%% (...)> items in one of my agenda files as
>> these gave me error messages about the sexp.
>
> Could you show one of the culprits?

One example:

      <%%(and (= 5 (calendar-day-of-week date)) (diary-block 2009 11 16 2009 12 18))>

I had a number of ancient lines related to my teaching schedule.  I now
use cloning of subtrees so I don't have any relevant lines like these
any more.

>> Finally, most importantly, the actual items shown in the day view with
>> the new code are only a subset of those shown with the old view.  I
>> cannot see any pattern in those omitted.
>
> There may be more than one pattern involved. Maybe the types involved
> would help.

From memory, the skipped entries were SCHEDULED TODO items.  But so were
the ones shown as the majority of my agenda view is such items.  Not
sure if they had DEADLINEs as well or not.  Will check later today.

> I updated the "wip-agenda-speedup" branch (rebasing needed). It should
> now call `org-agenda-skip' less often. Could you try again using that?

Sure.  Hopefully later today.

thanks,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-28 14:24   ` Nicolas Goaziou
  2017-08-29  6:52     ` Eric S Fraga
@ 2017-08-29  8:06     ` Eric S Fraga
  2017-08-30  9:00       ` Nicolas Goaziou
  1 sibling, 1 reply; 42+ messages in thread
From: Eric S Fraga @ 2017-08-29  8:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 4490 bytes --]

On Monday, 28 Aug 2017 at 16:24, Nicolas Goaziou wrote:
> I updated the "wip-agenda-speedup" branch (rebasing needed). It should
> now call `org-agenda-skip' less often. Could you try again using that?

I am not sure what "rebasing needed" means and whether I need to do
anything special.  I did "git pull", "git checkout wip-agenda-speedup"
and "make".

I get the following results now:

Default version:

| org-agenda-list                   |     3 | 25.169072093 | 8.3896906976 |
| org-agenda-redo                   |     2 | 23.729199963 | 11.864599981 |
| org-let                           |     2 | 21.949337096 | 10.974668548 |
| org-agenda-get-day-entries        |   768 | 20.485554483 | 0.0266738990 |
| org-agenda-get-scheduled          |   768 | 13.140805835 | 0.0171104242 |
| org-agenda-later                  |     1 | 12.218471156 | 12.218471156 |
| org-agenda-view-mode-dispatch     |     1 | 11.774425814 | 11.774425814 |
| org-agenda-month-view             |     1 | 11.511459292 | 11.511459292 |
| org-agenda-change-time-span       |     1 | 11.511454414 | 11.511454414 |
| org-agenda-prepare-buffers        |     5 |  6.235086298 | 1.2470172596 |
| org-at-planning-p                 | 38286 | 4.9494982779 | 0.0001292769 |
| org-agenda-prepare                |     3 | 4.6090207959 | 1.5363402653 |
| org-agenda                        |     1 |  3.444506372 |  3.444506372 |
| org-agenda-skip                   | 42757 | 3.0357010199 | 7.099...e-05 |
| org-agenda-get-deadlines          |   768 | 2.9264708689 | 0.0038105089 |
| org-back-to-heading               | 85980 | 2.7460824440 | 3.193...e-05 |
| org-agenda--timestamp-to-absolute | 57206 | 2.7053754779 | 4.729...e-05 |
| org-get-todo-state                | 37819 | 2.5136005120 | 6.646...e-05 |
| org-time-string-to-absolute       | 57206 | 2.2163205409 | 3.874...e-05 |
| org-agenda-get-blocks             |   768 | 2.1708883639 | 0.0028266775 |
| org-inlinetask-in-task-p          | 37309 | 2.0235439769 | 5.423...e-05 |
| org-get-agenda-file-buffer        |   828 | 1.9225380609 | 0.0023219058 |
| org-agenda-to-appt                |     2 |  1.776863076 |  0.888431538 |

New wip-agenda-speedup version:

| org-agenda-list                   |      3 | 31.765126901 | 10.588375633 |
| org-agenda-redo                   |      2 | 30.228140779 | 15.114070389 |
| org-let                           |      2 | 27.439146923 | 13.719573461 |
| org-agenda-day-entries            |    706 | 25.781168166 | 0.0365172353 |
| org-agenda-later                  |      1 | 15.415702875 | 15.415702875 |
| org-agenda-view-mode-dispatch     |      1 | 15.065425835 | 15.065425835 |
| org-agenda-month-view             |      1 | 14.817610403 | 14.817610403 |
| org-agenda-change-time-span       |      1 | 14.817599293 | 14.817599293 |
| org-get-todo-state                | 150556 | 12.739302215 | 8.461...e-05 |
| org-back-to-heading               | 162734 | 11.384205458 | 6.995...e-05 |
| org-agenda-prepare-buffers        |      5 |  6.309316915 | 1.2618633830 |
| org-agenda                        |      1 | 4.5347066179 | 4.5347066179 |
| org-agenda-prepare                |      3 |  4.526386149 |  1.508795383 |
| org-agenda--timestamp-to-absolute |  65195 | 3.6421088350 | 5.586...e-05 |
| org-agenda-to-appt                |      2 |   2.78557571 |  1.392787855 |
| org-time-string-to-absolute       |  65195 | 2.7304234570 | 4.188...e-05 |
| org-indent-initialize-agent       |     11 | 2.5848328029 | 0.2349848002 |
| org-indent-initialize-buffer      |     11 |  2.584644208 | 0.2349676552 |
| org-get-repeat                    | 113814 | 2.2632576760 | 1.988...e-05 |
| org-agenda--all-filtered-data     |      3 |  1.997229961 | 0.6657433203 |
| org-get-agenda-file-buffer        |    862 | 1.9403902009 | 0.0022510327 |
| org-end-of-subtree                |   4920 | 1.7806221550 | 0.0003619150 |
| org-mode                          |     10 |  1.736419648 | 0.1736419648 |
| org-agenda--file-data             |     60 | 1.5899973689 | 0.0264999561 |

Please do not compare the times from these runs with those of
yesterday.  This is a different computer, a much older one but with Xeon
processors so difficult to compare...

(also ignore org version in this email signature as it comes from before
updating the repository)

I hope this helps!

Thanks,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-29  6:52     ` Eric S Fraga
@ 2017-08-29 15:56       ` Robert Horn
  0 siblings, 0 replies; 42+ messages in thread
From: Robert Horn @ 2017-08-29 15:56 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Org Mode List, Nicolas Goaziou


I'll note that I use %%( entries for sunset/sunrise, e.g.,
%%(diary-sunrise), and for some schedules that need logic that does "shift one
day if Monday is a holiday".

That means I will need the %%( functionality to keep working.  I suspect
I'm not alone.  These are some fairly old and stable functions that I'd
actually forgotten about until I tried org-super-agenda and noticed that
it broke them.  (Now fixed).

R Horn

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-29  8:06     ` Eric S Fraga
@ 2017-08-30  9:00       ` Nicolas Goaziou
  2017-08-30  9:41         ` Eric S Fraga
  2017-08-30  9:42         ` Eric S Fraga
  0 siblings, 2 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-08-30  9:00 UTC (permalink / raw)
  To: Org Mode List

Hello,

Eric S Fraga <esflists@gmail.com> writes:

>> I updated the "wip-agenda-speedup" branch (rebasing needed). It should
>> now call `org-agenda-skip' less often. Could you try again using that?
>
> I am not sure what "rebasing needed" means

It means that "git pull" may not be sufficient, since I overwrite
history on this branch.

> and whether I need to do anything special.

At the very least, you need to make sure the cache is clean, with

  (clrhash org-agenda--data-cache)

or by trying in a fresh Emacs session. I didn't change the cache format
so far, though.

> Default version:
>
> | org-agenda-list                   |     3 | 25.169072093 | 8.3896906976 |
> | org-agenda-redo                   |     2 | 23.729199963 | 11.864599981 |
> | org-let                           |     2 | 21.949337096 | 10.974668548 |
> | org-agenda-get-day-entries        |   768 | 20.485554483 | 0.0266738990 |
> | org-agenda-get-scheduled          |   768 | 13.140805835 | 0.0171104242 |
> | org-agenda-later                  |     1 | 12.218471156 | 12.218471156 |
> | org-agenda-view-mode-dispatch     |     1 | 11.774425814 | 11.774425814 |
> | org-agenda-month-view             |     1 | 11.511459292 | 11.511459292 |
> | org-agenda-change-time-span       |     1 | 11.511454414 | 11.511454414 |
> | org-agenda-prepare-buffers        |     5 |  6.235086298 | 1.2470172596 |
> | org-at-planning-p                 | 38286 | 4.9494982779 | 0.0001292769 |
> | org-agenda-prepare                |     3 | 4.6090207959 | 1.5363402653 |
> | org-agenda                        |     1 |  3.444506372 |  3.444506372 |
> | org-agenda-skip                   | 42757 | 3.0357010199 | 7.099...e-05 |
> | org-agenda-get-deadlines          |   768 | 2.9264708689 | 0.0038105089 |
> | org-back-to-heading               | 85980 | 2.7460824440 | 3.193...e-05 |
> | org-agenda--timestamp-to-absolute | 57206 | 2.7053754779 | 4.729...e-05 |
> | org-get-todo-state                | 37819 | 2.5136005120 | 6.646...e-05 |
> | org-time-string-to-absolute       | 57206 | 2.2163205409 | 3.874...e-05 |
> | org-agenda-get-blocks             |   768 | 2.1708883639 | 0.0028266775 |
> | org-inlinetask-in-task-p          | 37309 | 2.0235439769 | 5.423...e-05 |
> | org-get-agenda-file-buffer        |   828 | 1.9225380609 | 0.0023219058 |
> | org-agenda-to-appt                |     2 |  1.776863076 |  0.888431538 |
>
> New wip-agenda-speedup version:
>
> | org-agenda-list                   |      3 | 31.765126901 | 10.588375633 |
> | org-agenda-redo                   |      2 | 30.228140779 | 15.114070389 |
> | org-let                           |      2 | 27.439146923 | 13.719573461 |
> | org-agenda-day-entries            |    706 | 25.781168166 | 0.0365172353 |
> | org-agenda-later                  |      1 | 15.415702875 | 15.415702875 |
> | org-agenda-view-mode-dispatch     |      1 | 15.065425835 | 15.065425835 |
> | org-agenda-month-view             |      1 | 14.817610403 | 14.817610403 |
> | org-agenda-change-time-span       |      1 | 14.817599293 | 14.817599293 |
> | org-get-todo-state                | 150556 | 12.739302215 | 8.461...e-05 |
> | org-back-to-heading               | 162734 | 11.384205458 | 6.995...e-05 |
> | org-agenda-prepare-buffers        |      5 |  6.309316915 | 1.2618633830 |
> | org-agenda                        |      1 | 4.5347066179 | 4.5347066179 |
> | org-agenda-prepare                |      3 |  4.526386149 |  1.508795383 |
> | org-agenda--timestamp-to-absolute |  65195 | 3.6421088350 | 5.586...e-05 |
> | org-agenda-to-appt                |      2 |   2.78557571 |  1.392787855 |
> | org-time-string-to-absolute       |  65195 | 2.7304234570 | 4.188...e-05 |
> | org-indent-initialize-agent       |     11 | 2.5848328029 | 0.2349848002 |
> | org-indent-initialize-buffer      |     11 |  2.584644208 | 0.2349676552 |
> | org-get-repeat                    | 113814 | 2.2632576760 | 1.988...e-05 |
> | org-agenda--all-filtered-data     |      3 |  1.997229961 | 0.6657433203 |
> | org-get-agenda-file-buffer        |    862 | 1.9403902009 | 0.0022510327 |
> | org-end-of-subtree                |   4920 | 1.7806221550 | 0.0003619150 |
> | org-mode                          |     10 |  1.736419648 | 0.1736419648 |
> | org-agenda--file-data             |     60 | 1.5899973689 | 0.0264999561 |

Still no luck. At least, it is obvious where the hanging fruits are.

Unfortunately, I'm not sure where those numbers of `org-get-todo-state'
and `org-back-to-heading' come from. For example, there are as many
`org-get-todo-state' calls from "org-agenda.el" in both "master" and
"wip-agenda-speedup" branches.

Information is missing in your report. For example, I don't know how
many times `org-agenda-skip' was called in the "wip-agenda-speedup"
version.

Could you try again with a fresh "wip-agenda-speedup" branch (I fixed
"<%%...>" timestamps) and post a full ELP report?

Thank you!


Regards,

-- 
Nicolas Goaziou                                                0x80A93738

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-30  9:00       ` Nicolas Goaziou
@ 2017-08-30  9:41         ` Eric S Fraga
  2017-08-30 15:00           ` Nicolas Goaziou
  2017-08-30  9:42         ` Eric S Fraga
  1 sibling, 1 reply; 42+ messages in thread
From: Eric S Fraga @ 2017-08-30  9:41 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List


[-- Attachment #1.1: Type: text/plain, Size: 595 bytes --]

On Wednesday, 30 Aug 2017 at 11:00, Nicolas Goaziou wrote:
> or by trying in a fresh Emacs session. I didn't change the cache format
> so far, though.

All tests are with fresh emacs sessions: emacs, instrument package,
agenda, view month, next month, elp results, exit emacs.

Default and speedup results attached with org from a minute or so
ago.  Still quite a difference between the two and not in the desired
direction :-(  Hope these results help!

(back to first computer in case you were keeping track)

Thanks,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-715-g8b5b2c

[-- Attachment #1.2: defaultelp.txt --]
[-- Type: text/plain, Size: 20635 bytes --]

org-agenda-list                                               3           19.615536284  6.5385120946
org-agenda-redo                                               2           18.338604917  9.1693024585
org-let                                                       2           16.744135962  8.372067981
org-agenda-get-day-entries                                    768         15.307202554  0.0199312533
org-agenda-get-scheduled                                      768         9.8357005239  0.0128069017
org-agenda-later                                              1           9.378686659   9.378686659
org-agenda-view-mode-dispatch                                 1           9.16790673    9.16790673
org-agenda-month-view                                         1           8.960431599   8.960431599
org-agenda-change-time-span                                   1           8.960423986   8.960423986
org-agenda-prepare-buffers                                    5           5.656869958   1.1313739915
org-agenda-prepare                                            3           4.184791168   1.3949303893
org-at-planning-p                                             39168       3.8068944489  9.719...e-05
org-agenda                                                    1           3.05617929    3.05617929
org-back-to-heading                                           86854       2.3679976289  2.726...e-05
org-agenda--timestamp-to-absolute                             56598       2.3283312469  4.113...e-05
org-indent-initialize-agent                                   9           2.0770357720  0.2307817524
org-indent-initialize-buffer                                  9           2.076821355   0.2307579283
org-agenda-skip                                               43642       2.0651276480  4.731...e-05
org-time-string-to-absolute                                   56598       2.0122050389  3.555...e-05
org-agenda-get-blocks                                         768         1.9067488329  0.0024827458
org-agenda-get-deadlines                                      768         1.8708426799  0.0024359930
org-get-agenda-file-buffer                                    828         1.8227216149  0.0022013546
org-end-of-subtree                                            5014        1.7007795029  0.0003392061
org-mode                                                      10          1.650076729   0.1650076729
org-agenda-to-appt                                            2           1.592130069   0.7960650345
org-set-startup-visibility                                    10          1.4465168379  0.1446516837
org-get-todo-state                                            38704       1.4276157679  3.688...e-05
org-parse-time-string                                         66105       1.3716788229  2.075...e-05
org-inlinetask-in-task-p                                      37306       1.2408245400  3.326...e-05
org-agenda-get-timestamps                                     768         1.206963151   0.0015715666
org-cycle-hide-drawers                                        14          1.111790466   0.0794136047
org-at-item-p                                                 15272       0.9609090140  6.291...e-05
org-in-commented-heading-p                                    4670        0.9489873300  0.0002032092
org-element-at-point                                          2565        0.8369609749  0.0003263005
org-element--parse-to                                         2565        0.7870030489  0.0003068238
org-indent-set-line-properties                                16922       0.6453445200  3.813...e-05
org-closest-date                                              19872       0.6436876209  3.239...e-05
org-list-in-valid-context-p                                   2529        0.542946589   0.0002146882
org-in-block-p                                                2529        0.5356518930  0.0002118038
org-indent-add-properties                                     9           0.521490343   0.0579433714
org-heading-components                                        4670        0.5198980630  0.0001113272
org-outline-level                                             12501       0.4742613580  3.793...e-05
org-element--current-element                                  4245        0.4740368930  0.0001116694
org-before-first-heading-p                                    6736        0.4436210890  6.585...e-05
org-agenda-get-sexps                                          744         0.4398278280  0.0005911664
org-refresh-category-properties                               60          0.3584520370  0.0059742006
org-in-src-block-p                                            43518       0.3537392909  8.128...e-06
org-time-string-to-time                                       7936        0.3325289599  4.190...e-05
org-get-limited-outline-regexp                                49095       0.2969274129  6.048...e-06
org-between-regexps-p                                         10116       0.2932883549  2.899...e-05
org-overview                                                  10          0.2311513710  0.0231151371
org-element-property-drawer-parser                            1859        0.2042113710  0.0001098501
org-refresh-properties                                        130         0.2002034129  0.0015400262
org-agenda-get-restriction-and-command                        1           0.184698229   0.184698229
org-agenda-skip-eval                                          87036       0.1644695190  1.889...e-06
org-refresh-stats-properties                                  60          0.159193729   0.0026532288
org-get-indentation                                           13742       0.1526705599  1.110...e-05
org-get-wdays                                                 36720       0.1445905540  3.937...e-06
org-flag-drawer                                               2522        0.1439000369  5.705...e-05
org-set-regexps-and-options                                   70          0.1364066339  0.0019486661
org--setup-collect-keywords                                   70          0.1320121490  0.0018858878
org-refresh-effort-properties                                 70          0.1080482829  0.0015435468
org-inlinetask-outline-regexp                                 37306       0.0963432569  2.582...e-06
org-agenda-finalize                                           3           0.0963273190  0.0321091063
org-at-date-range-p                                           2203        0.0942197739  4.276...e-05
org-agenda-align-tags                                         3           0.0929289230  0.0309763076
org-agenda-finalize-entries                                   49          0.087231309   0.0017802307
org-cycle-show-empty-lines                                    10          0.068212355   0.0068212355
org-list-item-body-column                                     2529        0.0665924460  2.633...e-05
org-in-regexp                                                 10116       0.0551628210  5.453...e-06
org-bookmark-jump-unhide                                      10          0.0361064669  0.0036106466
org-show-context                                              6           0.0359591700  0.0059931950
org-show-set-visibility                                       6           0.035937587   0.0059895978
org-element-planning-parser                                   851         0.0340234870  3.998...e-05
org-show-siblings                                             6           0.031992395   0.0053320658
org-add-props                                                 18884       0.0280526709  1.485...e-06
org-at-heading-p                                              8241        0.0277759519  3.370...e-06
org-item-re                                                   15323       0.0236513300  1.543...e-06
org-element-timestamp-parser                                  1570        0.0228394130  1.454...e-05
org-goto-sibling                                              454         0.0223333359  4.919...e-05
org-get-priority                                              144         0.0222726919  0.0001546714
org-at-property-p                                             100         0.0195568689  0.0001955686
org-macro-initialize-templates                                10          0.019072934   0.0019072934
org-diary-sexp-entry                                          1764        0.0183986129  1.043...e-05
org-date-to-gregorian                                         3228        0.0183095480  5.672...e-06
org-macro--collect-macros                                     10          0.0182879039  0.0018287903
org-set-visibility-according-to-property                      10          0.016725599   0.0016725599
org-find-base-buffer-visiting                                 828         0.0160249400  1.935...e-05
org-today                                                     3905        0.0158874290  4.068...e-06
org-cycle-hide-archived-subtrees                              10          0.015849003   0.0015849003
org-hide-archived-subtrees                                    10          0.015760515   0.0015760515
org-get-property-block                                        100         0.0153831619  0.0001538316
org-element-drawer-parser                                     1026        0.0153387809  1.495...e-05
org-babel-hide-all-hashes                                     10          0.014949643   0.0014949643
org-element-keyword-parser                                    379         0.0140795459  3.714...e-05
org-check-agenda-file                                         804         0.0132454449  1.647...e-05
org-agenda-format-item                                        151         0.0129841310  8.598...e-05
org-update-radio-target-regexp                                10          0.012651756   0.0012651756
org-agenda-today-p                                            1598        0.0115631399  7.236...e-06
org-switch-to-buffer-other-window                             1           0.00817611    0.00817611
org-element-property                                          7645        0.0079059619  1.034...e-06
org-flag-heading                                              460         0.0078485540  1.706...e-05
org-agenda-files                                              21          0.0060646329  0.0002887920
org-agenda-mode                                               3           0.005864045   0.0019546816
org-reduced-level                                             4832        0.0051153129  1.058...e-06
org-install-agenda-files-menu                                 10          0.0049170509  0.0004917051
org-element-type                                              5087        0.0049059099  9.644...e-07
org-indent-mode                                               10          0.004811588   0.0004811588
org-get-tags-at                                               149         0.0047801699  3.208...e-05
org-agenda-highlight-todo                                     151         0.004641244   3.073...e-05
org-indent--compute-prefixes                                  10          0.0044480560  0.0004448056
org-element--collect-affiliated-keywords                      1461        0.0043909339  3.005...e-06
org-days-to-iso-week                                          68          0.004373048   6.430...e-05
org-element--cache-put                                        4245        0.0040974029  9.652...e-07
org-agenda-new-marker                                         293         0.0037953160  1.295...e-05
org-up-heading-safe                                           18          0.0029519620  0.0001639978
org-hide-block-all                                            1           0.002817865   0.002817865
org-block-map                                                 1           0.002810043   0.002810043
org-make-options-regexp                                       70          0.0021098660  3.014...e-05
org-fit-window-to-buffer                                      1           0.002036606   0.002036606
org-activate-links                                            4           0.00171163    0.0004279075
org-entries-lessp                                             232         0.0016095130  6.937...e-06
org-get-time-of-day                                           190         0.0014131250  7.437...e-06
org-current-level                                             9           0.001287827   0.0001430918
org-do-emphasis-faces                                         3           0.001273508   0.0004245026
org-element-inlinetask-parser                                 13          0.001083886   8.337...e-05
org-agenda-fix-displayed-tags                                 151         0.0010804649  7.155...e-06
org-element--list-struct                                      11          0.0009775159  8.886...e-05
org-element-comment-parser                                    12          0.0009628479  8.023...e-05
org-agenda-get-day-face                                       62          0.0008429330  1.359...e-05
org-agenda-prepare-window                                     3           0.000801792   0.0002672639
org-link-set-parameters                                       1           0.000733066   0.000733066
org-split-string                                              107         0.0007279659  6.803...e-06
org-hide-block-toggle-maybe                                   3           0.000698915   0.0002329716
org-hide-block-toggle                                         3           0.000690532   0.0002301773
org-element-paragraph-parser                                  36          0.0006540779  1.816...e-05
org-find-invisible-foreground                                 10          0.000602113   6.021...e-05
org-get-category                                              149         0.0005844429  3.922...e-06
org-element-item-parser                                       49          0.0005751479  1.173...e-05
org-element--get-time-properties                              13          0.000498747   3.836...e-05
org-downcase-keep-props                                       242         0.0004865230  2.010...e-06
org-make-link-regexps                                         1           0.000424922   0.000424922
org-plist-delete                                              79          0.0004110290  5.202...e-06
org-show-entry                                                4           0.0003798039  9.495...e-05
org-agenda-find-same-or-today-or-agenda                       2           0.000347676   0.000173838
org-agenda-fontify-priorities                                 3           0.000334896   0.000111632
org-get-todo-face                                             79          0.000301154   3.812...e-06
org-element-update-syntax                                     1           0.000298367   0.000298367
org-babel-hide-hash                                           68          0.0002825869  4.155...e-06
org-agenda-span-name                                          84          0.000280207   3.335...e-06
org-element-src-block-parser                                  4           0.000276159   6.903975e-05
org-setup-filling                                             10          0.000215884   2.15884e-05
org-element--set-regexps                                      1           0.000200448   0.000200448
org-extract-log-state-settings                                60          0.0001949280  3.248...e-06
org-file-menu-entry                                           156         0.0001917840  1.229...e-06
org-agenda-get-category-icon                                  151         0.0001845249  1.222...e-06
org-property-inherit-p                                        130         0.000140878   1.083...e-06
org-agenda-add-time-grid-maybe                                62          0.000130742   2.108...e-06
org-string-nw-p                                               39          0.000126833   3.252...e-06
org-element--get-node-properties                              13          0.0001122360  8.633...e-06
org-element-cache-reset                                       11          0.000107837   9.803...e-06
org-element-plain-list-parser                                 15          0.000105954   7.0636e-06
org-unescape-code-in-string                                   4           0.000104902   2.62255e-05
org-set-font-lock-defaults                                    10          0.0001014110  1.01411e-05
org-agenda-time-of-day-to-ampm-maybe                          87          9.442...e-05  1.085...e-06
org-compile-prefix-format                                     3           8.4719e-05    2.823...e-05
org-tag-alist-to-groups                                       70          8.464...e-05  1.209...e-06
org-face-from-face-or-color                                   91          8.171...e-05  8.979...e-07
org-invisible-p                                               14          6.6769e-05    4.769...e-06
org-agenda-reset-markers                                      3           5.433...e-05  1.811...e-05
org-compute-latex-and-related-regexp                          10          5.2032e-05    5.2032e-06
org-setup-comments-handling                                   10          5.0149e-05    5.0149e-06
org-element-clock-parser                                      1           4.889e-05     4.889e-05
org-remove-keyword-keys                                       10          4.8401e-05    4.8401e-06
org-element-link-parser                                       1           3.8483e-05    3.8483e-05
org-macro--counter-initialize                                 10          3.7715e-05    3.771...e-06
org-agenda-deadline-face                                      17          3.505...e-05  2.062...e-06
org-agenda-set-mode-name                                      4           2.695...e-05  6.739...e-06
org-agenda-mark-header-line                                   3           2.5842e-05    8.614...e-06
org-agenda-compute-starting-span                              1           2.2559e-05    2.2559e-05
org-assign-fast-keys                                          10          2.228...e-05  2.228...e-06
org-delete-all                                                10          2.172...e-05  2.1721e-06
org-babel-result-hide-spec                                    10          1.9555e-05    1.9555e-06
org-contextualize-keys                                        1           1.9347e-05    1.9347e-05
org-load-modules-maybe                                        10          1.5717e-05    1.5717e-06
org-unhighlight                                               3           1.494...e-05  4.982...e-06
org-add-prop-inherited                                        5           1.417...e-05  2.835...e-06
org-clock-load                                                10          1.417...e-05  1.417...e-06
org-agenda-span-to-ndays                                      3           1.361...e-05  4.539...e-06
org-link-get-parameter                                        7           1.3341e-05    1.905...e-06
org-agenda-check-type                                         2           1.1174e-05    5.587e-06
org-link-expand-abbrev                                        1           7.823e-06     7.823e-06
org-agenda-use-sticky-p                                       3           7.474e-06     2.491...e-06
org-link-types                                                3           7.472...e-06  2.491e-06
org--update-property-plist                                    2           7.124e-06     3.562e-06
org-agenda-ndays-to-span                                      6           6.775e-06     1.129...e-06
org-set-sorting-strategy                                      3           4.889e-06     1.629...e-06
org-agenda-update-agenda-type                                 3           4.75e-06      1.583...e-06
org-agenda-fit-window-to-buffer                               3           4.190...e-06  1.396...e-06
org-agenda-mark-clocking-task                                 3           3.563...e-06  1.187...e-06
org-font-lock-add-tag-faces                                   3           3.562e-06     1.187...e-06
org-region-active-p                                           1           2.864e-06     2.864e-06
org-show-block-all                                            1           2.654e-06     2.654e-06
org-release-buffers                                           2           2.166e-06     1.083e-06
org-remove-flyspell-overlays-in                               1           1.397e-06     1.397e-06

[-- Attachment #1.3: speedupelp.txt --]
[-- Type: text/plain, Size: 21137 bytes --]

org-agenda-list                                               3           27.537398808  9.179132936
org-agenda-redo                                               2           26.053122691  13.026561345
org-let                                                       2           23.733991924  11.866995962
org-agenda-day-entries                                        706         22.231123315  0.0314888432
org-agenda-later                                              1           13.198030996  13.198030996
org-agenda-view-mode-dispatch                                 1           13.080431677  13.080431677
org-agenda-month-view                                         1           12.855902427  12.855902427
org-agenda-change-time-span                                   1           12.855895023  12.855895023
org-get-todo-state                                            151580      11.593622444  7.648...e-05
org-back-to-heading                                           163720      10.898221682  6.656...e-05
org-agenda-prepare-buffers                                    5           5.796474583   1.1592949166
org-agenda-prepare                                            3           4.360371498   1.453457166
org-agenda                                                    1           3.972051268   3.972051268
org-agenda--timestamp-to-absolute                             64576       2.7114777179  4.198...e-05
org-get-repeat                                                113942      2.5119567659  2.204...e-05
org-indent-initialize-agent                                   13          2.5084504610  0.1929577277
org-indent-initialize-buffer                                  13          2.5081488119  0.1929345239
org-agenda-to-appt                                            2           2.31656042    1.15828021
org-time-string-to-absolute                                   64576       2.1856115380  3.384...e-05
org-get-agenda-file-buffer                                    862         1.7535096899  0.0020342339
org-end-of-subtree                                            4890        1.688654281   0.0003453280
org-mode                                                      10          1.5837572379  0.1583757237
org-agenda--file-data                                         60          1.3505668179  0.0225094469
org-at-item-p                                                 18376       1.3478664009  7.334...e-05
org-agenda--all-filtered-data                                 3           1.272300399   0.424100133
org-set-startup-visibility                                    10          1.226294308   0.1226294308
org-in-commented-heading-p                                    4670        1.1704751349  0.0002506370
org-parse-time-string                                         66147       1.0651923889  1.610...e-05
org-cycle-hide-drawers                                        14          0.9990938640  0.0713638474
org-list-in-valid-context-p                                   3089        0.8829849430  0.0002858481
org-in-block-p                                                3089        0.8738662009  0.0002828961
org-indent-set-line-properties                                20217       0.8012287690  3.963...e-05
org-element-at-point                                          2565        0.7422967030  0.0002893944
org-element--parse-to                                         2565        0.6927156320  0.0002700645
org-closest-date                                              19872       0.6513044089  3.277...e-05
org-heading-components                                        4670        0.6369890170  0.0001364002
org-between-regexps-p                                         12356       0.5995309979  4.852...e-05
org-today                                                     77283       0.5958962330  7.710...e-06
org-outline-level                                             12381       0.4894215330  3.953...e-05
org-element--current-element                                  4245        0.4664862180  0.0001098907
org-indent-add-properties                                     13          0.463091935   0.0356224565
org-agenda--timestamp-data                                    11          0.4448373509  0.0404397591
org-before-first-heading-p                                    4774        0.4297171300  9.001...e-05
org-refresh-category-properties                               60          0.338736355   0.0056456059
org-item-re                                                   18427       0.3192281619  1.732...e-05
org-agenda-today-p                                            38512       0.2688037729  6.979...e-06
org-at-planning-p                                             2724        0.2101030219  7.713...e-05
org-refresh-properties                                        130         0.2061024129  0.0015854031
org-agenda-get-restriction-and-command                        1           0.168538364   0.168538364
org-refresh-stats-properties                                  60          0.1650144690  0.0027502411
org-agenda-skip                                               7386        0.1612482340  2.183...e-05
org-agenda--planning-data                                     11          0.1405083899  0.0127734899
org-flag-drawer                                               2522        0.1400504819  5.553...e-05
org-set-regexps-and-options                                   70          0.1359782699  0.0019425467
org-agenda-skip-eval                                          14772       0.1320853130  8.941...e-06
org--setup-collect-keywords                                   70          0.1315522749  0.0018793182
org-overview                                                  10          0.129389107   0.0129389107
org-add-props                                                 22179       0.1225973479  5.527...e-06
org-element-property-drawer-parser                            1859        0.1175982140  6.325...e-05
org-element-planning-parser                                   851         0.1112793449  0.0001307630
org-refresh-effort-properties                                 70          0.11104155    0.0015863078
org-agenda--entry-from-timestamp                              114838      0.108389985   9.438...e-07
org-date-to-gregorian                                         3228        0.1016584959  3.149...e-05
org-element-timestamp-parser                                  1570        0.0998951050  6.362...e-05
org-get-indentation                                           16301       0.0978548949  6.002...e-06
org-match-line                                                1407        0.0932657830  6.628...e-05
org-agenda-finalize-entries                                   49          0.0903814959  0.0018445203
org-agenda-highlight-todo                                     151         0.0865402230  0.0005731140
org-list-item-body-column                                     3089        0.0847660199  2.744...e-05
org-in-regexp                                                 12356       0.0693863099  5.615...e-06
org-get-wdays                                                 36720       0.0667972129  1.819...e-06
org-cycle-show-empty-lines                                    10          0.0661725260  0.0066172526
org-get-limited-outline-regexp                                13334       0.0530968709  3.982...e-06
org-inlinetask-in-task-p                                      1420        0.0473583229  3.335...e-05
org-agenda--entry-from-scheduled                              33154       0.0400803339  1.208...e-06
org-at-heading-p                                              8241        0.0278450699  3.378...e-06
org-get-priority                                              144         0.0258879079  0.0001797771
org-bookmark-jump-unhide                                      10          0.024119773   0.0024119773
org-show-context                                              6           0.0239599029  0.0039933171
org-show-set-visibility                                       6           0.02393888    0.0039898133
org-at-property-p                                             100         0.020130855   0.0002013085
org-find-base-buffer-visiting                                 862         0.0201091400  2.332...e-05
org-show-siblings                                             6           0.020002973   0.0033338288
org-in-src-block-p                                            1407        0.0198614140  1.411...e-05
org-agenda-finalize                                           3           0.017527826   0.0058426086
org-macro-initialize-templates                                10          0.016901267   0.0016901267
org-macro--collect-macros                                     10          0.0161387949  0.0016138794
org-element-drawer-parser                                     1026        0.0159515460  1.554...e-05
org-get-property-block                                        100         0.015804592   0.0001580459
org-diary-sexp-entry                                          1764        0.0156542080  8.874...e-06
org-element-keyword-parser                                    379         0.0150852160  3.980...e-05
org-babel-hide-all-hashes                                     10          0.0149632040  0.0014963204
org-set-visibility-according-to-property                      10          0.014704018   0.0014704018
org-cycle-hide-archived-subtrees                              10          0.014150099   0.0014150099
org-agenda-align-tags                                         3           0.0140757879  0.0046919293
org-hide-archived-subtrees                                    10          0.014062168   0.0014062168
org-agenda-format-item                                        151         0.0139323990  9.226...e-05
org-goto-sibling                                              454         0.013841808   3.048...e-05
org-agenda--diary-data                                        12          0.0134824740  0.0011235395
org-update-radio-target-regexp                                10          0.0114438420  0.0011443842
org-agenda--entry-from-range                                  3968        0.010998455   2.771...e-06
org-agenda--entry-from-deadline                               4736        0.0103946640  2.194...e-06
org-switch-to-buffer-other-window                             1           0.008752807   0.008752807
org-element-property                                          7645        0.0078441669  1.026...e-06
org-agenda-mode                                               3           0.006583219   0.0021944063
org-agenda-files                                              21          0.0060559080  0.0002883765
org-days-to-iso-week                                          68          0.005373614   7.902...e-05
org-reduced-level                                             4832        0.0053384829  1.104...e-06
org-flag-heading                                              460         0.005043545   1.096...e-05
org-element-type                                              5087        0.0049102749  9.652...e-07
org-indent-mode                                               10          0.004841764   0.0004841764
org-get-tags-at                                               149         0.0047255549  3.171...e-05
org-install-agenda-files-menu                                 10          0.004700474   0.0004700473
org-indent--compute-prefixes                                  10          0.004510153   0.0004510153
org-element--collect-affiliated-keywords                      1461        0.0043729259  2.993...e-06
org-element--cache-put                                        4245        0.0040445349  9.527...e-07
org-agenda--entry-from-diary                                  868         0.0037233760  4.289...e-06
org-inlinetask-outline-regexp                                 1420        0.0034715970  2.444...e-06
org-check-agenda-file                                         96          0.0030893450  3.218...e-05
org-up-heading-safe                                           18          0.0029425329  0.0001634740
org-hide-block-all                                            1           0.002842312   0.002842312
org-block-map                                                 1           0.00283421    0.00283421
org-current-level                                             13          0.002629432   0.0002022640
org-fit-window-to-buffer                                      1           0.002381072   0.002381072
org-make-options-regexp                                       70          0.0021470309  3.067...e-05
org-activate-links                                            4           0.001882325   0.0004705812
org-get-time-of-day                                           190         0.0016039370  8.441...e-06
org-entries-lessp                                             228         0.0016020580  7.026...e-06
org-do-emphasis-faces                                         3           0.001267572   0.000422524
org-agenda-fix-displayed-tags                                 151         0.0012388660  8.204...e-06
org-element-comment-parser                                    12          0.001051202   8.760...e-05
org-element-inlinetask-parser                                 13          0.001031224   7.932...e-05
org-agenda-new-marker                                         293         0.0009806619  3.346...e-06
org-element--list-struct                                      11          0.000939174   8.537...e-05
org-agenda-get-day-face                                       62          0.0008115059  1.308...e-05
org-agenda-prepare-window                                     3           0.000803888   0.0002679626
org-split-string                                              107         0.0007862819  7.348...e-06
org-link-set-parameters                                       1           0.000717493   0.000717493
org-hide-block-toggle-maybe                                   3           0.000710788   0.0002369293
org-hide-block-toggle                                         3           0.000701778   0.000233926
org-agenda-find-same-or-today-or-agenda                       2           0.000624671   0.0003123355
org-find-invisible-foreground                                 10          0.000614403   6.14403e-05
org-element-paragraph-parser                                  36          0.0006072789  1.686...e-05
org-element-item-parser                                       49          0.0005718050  1.166...e-05
org-get-category                                              166         0.0005283559  3.182...e-06
org-downcase-keep-props                                       242         0.000484774   2.003...e-06
org-element--get-time-properties                              13          0.0004772349  3.671...e-05
org-plist-delete                                              79          0.0004538400  5.744...e-06
org-make-link-regexps                                         1           0.000412071   0.000412071
org-show-entry                                                4           0.000383926   9.59815e-05
org-get-todo-face                                             79          0.0003195270  4.044...e-06
org-babel-hide-hash                                           68          0.0003002510  4.415...e-06
org-element-update-syntax                                     1           0.000295713   0.000295713
org-element-src-block-parser                                  4           0.000264214   6.60535e-05
org-agenda-span-name                                          78          0.000245495   3.147...e-06
org-agenda-fontify-priorities                                 3           0.0002231469  7.438...e-05
org-setup-filling                                             10          0.000213649   2.13649e-05
org-agenda-get-category-icon                                  151         0.0002032409  1.345...e-06
org-element--set-regexps                                      1           0.000200657   0.000200657
org-file-menu-entry                                           156         0.0001954850  1.253...e-06
org-extract-log-state-settings                                60          0.0001917880  3.196...e-06
org-string-nw-p                                               46          0.000144017   3.130...e-06
org-property-inherit-p                                        130         0.0001394750  1.072...e-06
org-agenda-add-time-grid-maybe                                62          0.0001357709  2.189...e-06
org-element--get-node-properties                              13          0.0001076969  8.284...e-06
org-element-plain-list-parser                                 15          0.0001076269  7.175...e-06
org-unescape-code-in-string                                   4           0.000106091   2.652275e-05
org-element-cache-reset                                       11          0.0001037880  9.435...e-06
org-set-font-lock-defaults                                    10          0.000100991   1.00991e-05
org-agenda-time-of-day-to-ampm-maybe                          87          0.0001001569  1.151...e-06
org-tag-alist-to-groups                                       70          8.8558e-05    1.265...e-06
org-face-from-face-or-color                                   91          8.793...e-05  9.662...e-07
org-compile-prefix-format                                     3           8.534...e-05  2.8449e-05
org-invisible-p                                               14          7.3894e-05    5.278...e-06
org-compute-latex-and-related-regexp                          10          5.636...e-05  5.636...e-06
org-element-link-parser                                       1           5.0007e-05    5.0007e-05
org-remove-keyword-keys                                       10          4.979...e-05  4.979...e-06
org-element-clock-parser                                      1           4.875e-05     4.875e-05
org-agenda-reset-markers                                      3           4.7703e-05    1.5901e-05
org-setup-comments-handling                                   10          4.7146e-05    4.7146e-06
org-macro--counter-initialize                                 10          3.9739e-05    3.9739e-06
org-agenda-deadline-face                                      17          3.597...e-05  2.115...e-06
org-agenda-set-mode-name                                      4           2.8844e-05    7.211e-06
org-contextualize-keys                                        1           2.5842e-05    2.5842e-05
org-agenda-mark-header-line                                   3           2.5702e-05    8.567...e-06
org-assign-fast-keys                                          10          2.2557e-05    2.255...e-06
org-agenda-compute-starting-span                              1           2.1512e-05    2.1512e-05
org-delete-all                                                10          2.046...e-05  2.046...e-06
org-babel-result-hide-spec                                    10          1.7111e-05    1.7111e-06
org-load-modules-maybe                                        10          1.550...e-05  1.550...e-06
org-clock-load                                                10          1.4878e-05    1.4878e-06
org-add-prop-inherited                                        5           1.4457e-05    2.8914e-06
org-link-get-parameter                                        7           1.4177e-05    2.025...e-06
org-agenda-span-to-ndays                                      3           1.3758e-05    4.586e-06
org-unhighlight                                               3           1.2711e-05    4.237e-06
org-link-expand-abbrev                                        1           8.521e-06     8.521e-06
org-agenda-use-sticky-p                                       3           8.102e-06     2.700...e-06
org-agenda-ndays-to-span                                      6           7.543e-06     1.257...e-06
org-link-types                                                3           6.914e-06     2.304...e-06
org--update-property-plist                                    2           5.937...e-06  2.968...e-06
org-agenda-check-type                                         2           5.936...e-06  2.968...e-06
org-agenda-update-agenda-type                                 3           5.029e-06     1.676...e-06
org-agenda-fit-window-to-buffer                               3           4.75e-06      1.583...e-06
org-set-sorting-strategy                                      3           4.679...e-06  1.559...e-06
org-agenda-mark-clocking-task                                 3           3.981e-06     1.327e-06
org-font-lock-add-tag-faces                                   3           3.702...e-06  1.234...e-06
org-region-active-p                                           1           2.864e-06     2.864e-06
org-show-block-all                                            1           2.863e-06     2.863e-06
org-release-buffers                                           2           2.306e-06     1.153e-06
org-remove-flyspell-overlays-in                               1           1.816e-06     1.816e-06

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-30  9:00       ` Nicolas Goaziou
  2017-08-30  9:41         ` Eric S Fraga
@ 2017-08-30  9:42         ` Eric S Fraga
  1 sibling, 0 replies; 42+ messages in thread
From: Eric S Fraga @ 2017-08-30  9:42 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 134 bytes --]

Forgot to add: I re-enabled my 14 <%%()> lines for completeness.
-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-715-g8b5b2c

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-30  9:41         ` Eric S Fraga
@ 2017-08-30 15:00           ` Nicolas Goaziou
  2017-08-30 15:37             ` Eric S Fraga
  0 siblings, 1 reply; 42+ messages in thread
From: Nicolas Goaziou @ 2017-08-30 15:00 UTC (permalink / raw)
  To: Org Mode List

Eric S Fraga <esflists@gmail.com> writes:

> Default and speedup results attached with org from a minute or so
> ago.  Still quite a difference between the two and not in the desired
> direction :-(  Hope these results help!

Thank you.

I think I spotted the problem. I updated the branch. Could you try
again?

Also, are there missing entries (besides inactive timestamps)? If so,
would they be related to inlinetasks?

Regards,

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-30 15:00           ` Nicolas Goaziou
@ 2017-08-30 15:37             ` Eric S Fraga
  0 siblings, 0 replies; 42+ messages in thread
From: Eric S Fraga @ 2017-08-30 15:37 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]

On Wednesday, 30 Aug 2017 at 17:00, Nicolas Goaziou wrote:
> I think I spotted the problem. I updated the branch. Could you try
> again?

Done.  Attached is the resulting file from elp; much much better!  I
haven't rerun the default agenda as my agenda files may have changed but
only by 1-3 new entries.

Question as an aside: how do I best get the updates with git?  If I
checkout the branch, it tells me that I am 1 commit ahead and the remote
is 7 commits ahead (for instance).  I find I have to delete the branch
and then reacquire.  I'm not a big git user (mercurial is my VCS of
choice).

> Also, are there missing entries (besides inactive timestamps)? If so,
> would they be related to inlinetasks?

I haven't seen any missing entries since that first time.  I do not tend
to use inlinetasks in my agenda files, only within project specific
files which are not searched by the default agenda views.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-715-g8b5b2c

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 20:05 ` Samuel Wales
@ 2017-08-31 17:17   ` Nicolas Goaziou
  0 siblings, 0 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-08-31 17:17 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> On 8/27/17, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> I expect to see some interesting improvements when viewing the agenda
>> with a span larger than one day, or when generating an agenda view
>> without having touched most of the agenda files since last view.
>
> wow, great!  i have long wanted this.
>
>> The only thing that is expected to be defective is
>> `org-agenda-include-inactive-timestamps'. It has no effect at the
>> moment. I can activate it again, but I'm wondering if it's worth the
>> overhead. It is already possible to display clocks and closed timestamps
>> in the agenda. Other inactive timestamps could be ignored from the
>> agenda altogether. This is their sole purpose, after all. WDYT?
>
> totally disagree.  i totally rely on showing inactive timestamps.
>
> in fact, i created a face for inactive timestamps.
>
> i also do this:
>
> (setq org-agenda-inactive-leader "Inactive:  ")
>
> to better match Closed: and Clocked:.
>
> i keep logs like this:
>
> ********* CONVERSATION [#C] [2017-01-28 Sat 20:16] org changed its
> coloring for nokori, so past due shows tomorrow
>
> which show up nicely.  in fact, sometimes i do:
>
> ***** DONEKEEP [2017-08-27 Sun 12:52] sent email
>
> instead of doneifying.  showing closed tasks and donekeep at the same
> time makes sense to me.
>
> all of this keeps a record and can be sorted nicely in the outline
> with visual binary search, much better than date trees for me.
>
> i quite often will run agenda agenda on a restricted file, so that i
> can get all active timestamps, and closed timestamps, and clocking
> timestamps, and inactive timestamps for inside the restriction.  this
> gets sorted correctly, by timestamp.
>
> so i can see the active, closed, and clocking timestamps in context
> with my notes.  that is totally key for me.  missing inactive
> timestamps would violate the idea that i can bounce around the agenda
> agenda at various dates to see what i did on those dates.  for
> example, i go back 4 days to see what i did 4 days ago, and i see a
> record of everything, including random insertions of inactive
> timestamps, donekeep, conversation, closed, and clocked.  this feels
> like an essential org feature to me.
>
> i run agenda search also, to find relevant timestamps.  inactive are
> much more common than active.
>
> being able to see my logs with inactive timestamps in context with
> active timestamps and closed timestamps and clocking is useful.

The inactive time stamps are available again in the "wip-agenda-speedup"
branch.

Make sure to delete any local branch and start anew if you tried it
already. Also make sure to clear the cache, e.g., restarting the Emacs
session.

From now on, there will be no more rebasing on that branch, only regular
commits.

Feedback still very welcome.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 16:16 [ANN] Agenda speed up Nicolas Goaziou
                   ` (3 preceding siblings ...)
  2017-08-28 10:12 ` Eric S Fraga
@ 2017-09-29 20:45 ` Nicolas Goaziou
  2017-09-29 20:56   ` Samuel Wales
                     ` (2 more replies)
  2017-10-02  0:11 ` Matt Lundin
  5 siblings, 3 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-09-29 20:45 UTC (permalink / raw)
  To: Org Mode List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> I rewrote the part responsible for agenda generation in "org-agenda.el".
> Basically, I refactored some hot loops and introduced a cache mechanism
> for data extracted out of agenda files.
>
> I expect to see some interesting improvements when viewing the agenda
> with a span larger than one day, or when generating an agenda view
> without having touched most of the agenda files since last view.
>
> Some feedback about the new agenda speed would be nice.

If there is no more feedback nor objection, I'll merge the branch in
master before the end of the week.

Until then, the changes are still available in wip-agenda-speedup branch
for review.

Regards,

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-29 20:45 ` Nicolas Goaziou
@ 2017-09-29 20:56   ` Samuel Wales
  2017-09-30  8:55     ` Nicolas Goaziou
  2017-09-30  3:20   ` Kyle Meyer
  2017-09-30 18:54   ` Matt Lundin
  2 siblings, 1 reply; 42+ messages in thread
From: Samuel Wales @ 2017-09-29 20:56 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

have not beena ble to respons for health reasons.  i have rsposne
partly done.  i think result is slightly slower but seems tob e
correct if you count recent maint as correct.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-29 20:45 ` Nicolas Goaziou
  2017-09-29 20:56   ` Samuel Wales
@ 2017-09-30  3:20   ` Kyle Meyer
  2017-10-02 13:41     ` Nicolas Goaziou
  2017-09-30 18:54   ` Matt Lundin
  2 siblings, 1 reply; 42+ messages in thread
From: Kyle Meyer @ 2017-09-30  3:20 UTC (permalink / raw)
  To: Nicolas Goaziou, Org Mode List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> If there is no more feedback nor objection, I'll merge the branch in
> master before the end of the week.

One issue I noticed: The sorting of categories defined in
org-agenda-sorting-strategy is not honored.  The default category
sorting for the agenda is to order the categories as they appear in the
agenda files.

Take the following text as the agenda file.

--8<---------------cut here---------------start------------->8---

* y
:PROPERTIES:
:CATEGORY: y
:END:

** TODO a
SCHEDULED: <2017-09-29 Fri>

* x
:PROPERTIES:
:CATEGORY: x
:END:

** TODO b
SCHEDULED: <2017-09-29 Fri>
--8<---------------cut here---------------end--------------->8---

Running emacs -Q and "M-x org-agenda a" on master displays

    Week-agenda (W39):
    Monday     25 September 2017 W39
    Tuesday    26 September 2017
    Wednesday  27 September 2017
    Thursday   28 September 2017
    Friday     29 September 2017
      y:          Scheduled:  TODO a
      x:          Scheduled:  TODO b
    Saturday   30 September 2017
    Sunday      1 October 2017

Running the same sequence on wip-agenda-speedup displays

    Week-agenda (W39):
    Monday     25 September 2017 W39
    Tuesday    26 September 2017
    Wednesday  27 September 2017
    Thursday   28 September 2017
    Friday     29 September 2017
      x:          Scheduled:  TODO b
      y:          Scheduled:  TODO a
    Saturday   30 September 2017
    Sunday      1 October 2017

-- 
Kyle

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-29 20:56   ` Samuel Wales
@ 2017-09-30  8:55     ` Nicolas Goaziou
  2017-09-30 19:03       ` Matt Lundin
  0 siblings, 1 reply; 42+ messages in thread
From: Nicolas Goaziou @ 2017-09-30  8:55 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> have not beena ble to respons for health reasons.  i have rsposne
> partly done.  i think result is slightly slower but seems tob e
> correct if you count recent maint as correct.

It can be slightly slower if you start with a cold cache and never
re-use it, e.g., when you display only a single day and the most
important agenda files were modified since last agenda display.

OTOH, displaying, e.g., a whole week, month, year should be a lot
faster.

In any case, an ELP report is necessary to detect any abnormality.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-29 20:45 ` Nicolas Goaziou
  2017-09-29 20:56   ` Samuel Wales
  2017-09-30  3:20   ` Kyle Meyer
@ 2017-09-30 18:54   ` Matt Lundin
  2017-09-30 19:53     ` Matt Lundin
  2017-10-01 17:13     ` Nicolas Goaziou
  2 siblings, 2 replies; 42+ messages in thread
From: Matt Lundin @ 2017-09-30 18:54 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> If there is no more feedback nor objection, I'll merge the branch in
> master before the end of the week.
>
> Until then, the changes are still available in wip-agenda-speedup branch
> for review.

Thanks for the heads up. I just had a chance to test the
wip-agenda-speedup branch and find that it significantly slows down the
creation of agenda buffers with my agenda files and custom commands.

I think I have a fairly standard setup (some customizations, additional
features such as habits). I'll do some testing with minimal examples to
see if I can find out why the new branch is so much slower in my case.
In the meantime, I'd like to that the branch *not* be merged until we
are sure that it is actually faster for the majority of use cases.

Here is a quick comparison of the top elp-results using a couple of commands:

(org-todo-list "TODO")

master:
--8<---------------cut here---------------start------------->8---
org-todo-list                                                 1           0.95475971    0.95475971
org-agenda-prepare                                            1           0.425165363   0.425165363
org-agenda-prepare-buffers                                    1           0.394949431   0.394949431
org-agenda-get-day-entries                                    63          0.2680520310  0.0042547941
org-agenda-get-todos                                          63          0.262784373   0.0041711805
org-agenda-finalize-entries                                   1           0.202006798   0.202006798
org-get-tags-at                                               454         0.200070026   0.0004406828
org-agenda-highlight-todo                                     227         0.1841641769  0.0008112959
org-back-to-heading                                           1207        0.1734143220  0.0001436738
--8<---------------cut here---------------end--------------->8---

wip-agenda-speedup:
--8<---------------cut here---------------start------------->8---
org-todo-list                                                 1           1.402434591   1.402434591
org-agenda-day-entries                                        63          0.4656588689  0.0073914106
org-agenda--entry-from-todo                                   2217        0.4304873449  0.0001941756
org-agenda-prepare                                            1           0.387713298   0.387713298
org-agenda-prepare-buffers                                    1           0.37858942    0.37858942
org-agenda--file-data                                         63          0.2997486200  0.0047579146
org-entry-get                                                 1402        0.2108398869  0.0001503850
org-entry-properties                                          1366        0.1953800049  0.0001430307
org-agenda-finalize-entries                                   1           0.191974038   0.191974038
org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item  237         0.1819146310  0.0007675722
org-agenda-highlight-todo                                     227         0.1735402220  0.0007644943
org-agenda--todo-data                                         7           0.1687917040  0.0241131005
org-back-to-heading                                           2336        0.1648271410  7.055...e-05
--8<---------------cut here---------------end--------------->8---

(org-agenda-list)

master:
--8<---------------cut here---------------start------------->8---
org-agenda-list                                               1           1.036426005   1.036426005
org-agenda-prepare                                            1           0.59630983    0.59630983
org-agenda-prepare-buffers                                    1           0.584742966   0.584742966
org-agenda-get-day-entries                                    63          0.388804281   0.0061714965
org-agenda-get-scheduled                                      63          0.287089758   0.0045569802
org-refresh-category-properties                               63          0.280568592   0.0044534697
org-habit-parse-todo                                          30          0.178230735   0.0059410245
org-time-string-to-time                                       219         0.162822094   0.0007434798
--8<---------------cut here---------------end--------------->8---

wip-agenda-speedup:
--8<---------------cut here---------------start------------->8---
org-agenda-list                                               1           1.37723502    1.37723502
org-agenda-prepare                                            1           0.594557456   0.594557456
org-agenda-prepare-buffers                                    1           0.582119253   0.582119253
org-agenda--all-filtered-data                                 1           0.307176728   0.307176728
org-agenda--file-data                                         63          0.279614084   0.0044383187
org-agenda-day-entries                                        53          0.2725648440  0.0051427329
org-agenda--entry-from-scheduled                              251         0.196999124   0.0007848570
org-entry-get                                                 378         0.1887249349  0.0004992723
org-is-habit-p                                                282         0.1811045989  0.0006422148
org-agenda-finalize                                           1           0.178296907   0.178296907
org-agenda-align-tags                                         1           0.158472831   0.158472831
org-add-props                                                 291         0.156753814   0.0005386729
org-refresh-category-properties                               63          0.1188651170  0.0018867478
org-refresh-properties                                        126         0.101092705   0.0008023230
--8<---------------cut here---------------end--------------->8---

Best,
Matt

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-30  8:55     ` Nicolas Goaziou
@ 2017-09-30 19:03       ` Matt Lundin
  2017-10-01 17:33         ` Nicolas Goaziou
  0 siblings, 1 reply; 42+ messages in thread
From: Matt Lundin @ 2017-09-30 19:03 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Samuel Wales <samologist@gmail.com> writes:
>
>> have not beena ble to respons for health reasons.  i have rsposne
>> partly done.  i think result is slightly slower but seems tob e
>> correct if you count recent maint as correct.
>
> It can be slightly slower if you start with a cold cache and never
> re-use it, e.g., when you display only a single day and the most
> important agenda files were modified since last agenda display.

I am finding that the branch is still much slower than the current
master even when no agenda files have changed (i.e., when running
org-agenda-redo in an existing agenda buffer without changing anything).
This is true even when I set org-element-use-cache to t.

> OTOH, displaying, e.g., a whole week, month, year should be a lot
> faster.

Is this an unavoidable trade-off? Since I am constantly refreshing
single day agenda buffers and todo lists, I would much prefer a faster
single day display to a faster week or month display.

Matt

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-30 18:54   ` Matt Lundin
@ 2017-09-30 19:53     ` Matt Lundin
  2017-10-01 17:13     ` Nicolas Goaziou
  1 sibling, 0 replies; 42+ messages in thread
From: Matt Lundin @ 2017-09-30 19:53 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

Matt Lundin <mdl@imapmail.org> writes:
>
> Here is a quick comparison of the top elp-results using a couple of commands:

I'm including the full elp results for reference. These were run with my
org agenda files and with customizations that I don't have time to
isolate at the moment. I'll try to provide a report with a minimal
config soon. The attached files contain profiling for the two commands
reported in my previous email.

(org-todo-list "TODO")

(org-agenda-list)

Best,
Matt


[-- Attachment #2: org-todo-list-master.txt --]
[-- Type: text/plain, Size: 10746 bytes --]

org-todo-list                                                 1           0.95475971    0.95475971
org-agenda-prepare                                            1           0.425165363   0.425165363
org-agenda-prepare-buffers                                    1           0.394949431   0.394949431
org-agenda-get-day-entries                                    63          0.2680520310  0.0042547941
org-agenda-get-todos                                          63          0.262784373   0.0041711805
org-agenda-finalize-entries                                   1           0.202006798   0.202006798
org-get-tags-at                                               454         0.200070026   0.0004406828
org-agenda-highlight-todo                                     227         0.1841641769  0.0008112959
org-back-to-heading                                           1207        0.1734143220  0.0001436738
org-refresh-category-properties                               63          0.1109007029  0.0017603286
org-refresh-properties                                        126         0.0968679490  0.0007687932
org-set-regexps-and-options                                   63          0.0660081399  0.0010477482
org--setup-collect-keywords                                   63          0.061246143   0.000972161
org-refresh-effort-properties                                 63          0.055947762   0.0008880597
org-refresh-stats-properties                                  63          0.049975411   0.0007932604
org-agenda-finalize                                           1           0.048449583   0.048449583
org-element-at-point                                          126         0.0278754009  0.0002212333
org-element--parse-to                                         126         0.0237195620  0.0001882504
org-get-priority                                              227         0.0201254490  8.865...e-05
org-agenda-files                                              3           0.0190556840  0.0063518946
org-element--current-element                                  189         0.0178631470  9.451...e-05
org-up-heading-safe                                           398         0.016063253   4.035...e-05
org-agenda-format-item                                        227         0.014556003   6.412...e-05
org-entries-lessp                                             859         0.0112956840  1.314...e-05
org-agenda-align-tags                                         1           0.01091671    0.01091671
org-agenda-mode                                               1           0.009271944   0.009271944
org-get-property-block                                        74          0.0081775990  0.0001105080
org-outline-level                                             799         0.0073207199  9.162...e-06
org-get-todo-state                                            238         0.005509511   2.314...e-05
org-entry-get                                                 36          0.0054365299  0.0001510147
org-element-keyword-parser                                    189         0.0054290560  2.872...e-05
org-at-property-p                                             38          0.005193692   0.0001366761
org--property-local-values                                    36          0.0049136239  0.0001364895
org-agenda-skip                                               237         0.0048559309  2.048...e-05
org-add-props                                                 832         0.0047682290  5.731...e-06
org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item  237         0.00459851    1.940...e-05
org-check-agenda-file                                         126         0.0042163329  3.346...e-05
org-inlinetask-in-task-p                                      74          0.003895827   5.264...e-05
org-get-agenda-file-buffer                                    126         0.0033892649  2.689...e-05
org-split-string                                              686         0.0033632589  4.902...e-06
org-get-limited-outline-regexp                                641         0.0033366020  5.205...e-06
org-activate-links                                            9           0.003008839   0.0003343154
org-remove-uninherited-tags                                   260         0.0029396989  1.130...e-05
org-find-base-buffer-visiting                                 126         0.0028278890  2.244...e-05
org-refresh-property                                          36          0.0027942159  7.761...e-05
org-at-heading-p                                              504         0.0027330949  5.422...e-06
org-element--collect-affiliated-keywords                      189         0.0026145799  1.383...e-05
org-agenda-new-marker                                         227         0.0018359170  8.087...e-06
org-time-stamp-to-now                                         56          0.0017452630  3.116...e-05
org-delete-all                                                260         0.0017409340  6.695...e-06
org-plist-delete                                              227         0.0015046700  6.628...e-06
org-make-options-regexp                                       63          0.001395789   2.215...e-05
org-in-src-block-p                                            237         0.0013642199  5.756...e-06
org-agenda-prepare-window                                     1           0.001322727   0.001322727
org-get-todo-face                                             228         0.0012922040  5.667...e-06
org-tag-alist-to-groups                                       63          0.001244642   1.975...e-05
org-get-category                                              227         0.0012190840  5.370...e-06
org-get-time-of-day                                           227         0.0011893229  5.239...e-06
org-time-string-to-time                                       56          0.001152317   2.057...e-05
org-agenda-entry-get-agenda-timestamp                         227         0.0011181529  4.925...e-06
org-before-first-heading-p                                    112         0.0009069619  8.097...e-06
org-agenda-today-p                                            63          0.000825108   1.309...e-05
org-agenda-skip-eval                                          474         0.0007415890  1.564...e-06
org-switch-to-buffer-other-window                             1           0.000720694   0.000720694
org-add-prop-inherited                                        322         0.0006083280  1.889...e-06
org-parse-time-string                                         56          0.0005683659  1.014...e-05
org-habit-insert-consistency-graphs                           1           0.000558173   0.000558173
org-today                                                     64          0.0004513120  7.051...e-06
org-duration-to-minutes                                       36          0.0004371359  1.214...e-05
org-agenda-get-category-icon                                  227         0.0004055680  1.786...e-06
org-downcase-keep-props                                       157         0.0004043789  2.575...e-06
org-agenda-fix-displayed-tags                                 227         0.0003902080  1.718...e-06
org-element-property                                          213         0.0003518690  1.651...e-06
org-reduced-level                                             229         0.0003490010  1.524...e-06
org-string-nw-p                                               63          0.0003420180  5.428...e-06
org-face-from-face-or-color                                   228         0.0003298029  1.446...e-06
org-element--cache-put                                        189         0.0002938919  1.554...e-06
org-inlinetask-outline-regexp                                 74          0.0002371149  3.204...e-06
org-element-link-parser                                       8           0.0002218869  2.773...e-05
org-agenda-reset-markers                                      1           0.000208407   0.000208407
org-end-of-subtree                                            3           0.000203938   6.797...e-05
org-element-type                                              126         0.0002006589  1.592...e-06
org-property-inherit-p                                        126         0.000200516   1.591...e-06
org-file-menu-entry                                           63          0.0001789349  2.840...e-06
org-agenda-fontify-priorities                                 1           0.000149531   0.000149531
org-in-commented-heading-p                                    2           0.000136261   6.81305e-05
org-not-nil                                                   72          0.0001215969  1.688...e-06
org-link-get-parameter                                        56          0.0001097930  1.960...e-06
org-heading-components                                        2           9.1073e-05    4.55365e-05
org-deadline-close-p                                          1           8.6324e-05    8.6324e-05
org-agenda-fit-window-to-buffer                               1           4.4699e-05    4.4699e-05
org-link-expand-abbrev                                        8           4.351e-05     5.43875e-06
org-entry-is-done-p                                           1           3.7924e-05    3.7924e-05
org-compile-prefix-format                                     1           2.7517e-05    2.7517e-05
org-agenda-propertize-selected-todo-keywords                  1           2.6261e-05    2.6261e-05
org-agenda-mark-header-line                                   2           1.6622e-05    8.311e-06
org-remove-flyspell-overlays-in                               8           1.382...e-05  1.728...e-06
org-agenda-set-mode-name                                      1           1.313e-05     1.313e-05
org-unhighlight                                               1           7.054e-06     7.054e-06
org-agenda-span-name                                          2           6.844e-06     3.422e-06
org-fit-window-to-buffer                                      1           6.425e-06     6.425e-06
org-get-wdays                                                 1           6.146e-06     6.146e-06
org-agenda-use-sticky-p                                       1           3.073e-06     3.073e-06
org-agenda-update-agenda-type                                 1           2.933e-06     2.933e-06
org-set-sorting-strategy                                      1           2.445e-06     2.445e-06
org-font-lock-add-tag-faces                                   1           2.025e-06     2.025e-06
org-agenda-mark-clocking-task                                 1           1.816e-06     1.816e-06

[-- Attachment #3: org-todo-list-wip.txt --]
[-- Type: text/plain, Size: 10952 bytes --]

org-todo-list                                                 1           1.402434591   1.402434591
org-agenda-day-entries                                        63          0.4656588689  0.0073914106
org-agenda--entry-from-todo                                   2217        0.4304873449  0.0001941756
org-agenda-prepare                                            1           0.387713298   0.387713298
org-agenda-prepare-buffers                                    1           0.37858942    0.37858942
org-agenda--file-data                                         63          0.2997486200  0.0047579146
org-entry-get                                                 1402        0.2108398869  0.0001503850
org-entry-properties                                          1366        0.1953800049  0.0001430307
org-agenda-finalize-entries                                   1           0.191974038   0.191974038
org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item  237         0.1819146310  0.0007675722
org-agenda-highlight-todo                                     227         0.1735402220  0.0007644943
org-agenda--todo-data                                         7           0.1687917040  0.0241131005
org-back-to-heading                                           2336        0.1648271410  7.055...e-05
org-refresh-category-properties                               63          0.1033856700  0.0016410423
org-refresh-properties                                        126         0.0925692610  0.0007346766
org-set-regexps-and-options                                   63          0.0600136400  0.0009525974
org--setup-collect-keywords                                   63          0.0559469850  0.0008880473
org-refresh-effort-properties                                 63          0.0536858000  0.0008521555
org-refresh-stats-properties                                  63          0.0467457880  0.0007419966
org-agenda-finalize                                           1           0.045951346   0.045951346
org-get-agenda-file-buffer                                    189         0.0374804749  0.0001983093
org-find-base-buffer-visiting                                 189         0.0367414170  0.0001943990
org-get-tags-at                                               454         0.0327995770  7.224...e-05
org-get-priority                                              227         0.026582848   0.0001171050
org-element-at-point                                          126         0.0239310290  0.0001899288
org-element--parse-to                                         126         0.0200882839  0.0001594308
org-agenda-format-item                                        227         0.0174349459  7.680...e-05
org-up-heading-safe                                           398         0.0159598840  4.010...e-05
org-element--current-element                                  189         0.0149973959  7.935...e-05
org-entries-lessp                                             859         0.0113986670  1.326...e-05
org-agenda-align-tags                                         1           0.010139792   0.010139792
org-get-property-block                                        74          0.0078789549  0.0001064723
org-agenda-files                                              3           0.0075184330  0.0025061443
org-agenda--get-tags                                          227         0.0066954109  2.949...e-05
org-outline-level                                             572         0.005016368   8.769...e-06
org-at-property-p                                             38          0.0049875829  0.0001312521
org-add-props                                                 832         0.0049498720  5.949...e-06
org--property-local-values                                    36          0.004704525   0.0001306812
org-element-keyword-parser                                    189         0.0045204270  2.391...e-05
org-check-agenda-file                                         126         0.0039826429  3.160...e-05
org-inlinetask-in-task-p                                      74          0.0037577550  5.078...e-05
org-get-category                                              701         0.0031140220  4.442...e-06
org-agenda-mode                                               1           0.00296058    0.00296058
org-activate-links                                            9           0.0029422119  0.0003269124
org-split-string                                              623         0.0029122619  4.674...e-06
org-get-limited-outline-regexp                                641         0.0028310800  4.416...e-06
org-remove-uninherited-tags                                   260         0.0027238139  1.047...e-05
org-refresh-property                                          36          0.0027030709  7.508...e-05
org-at-heading-p                                              504         0.0026439889  5.246...e-06
org-element--collect-affiliated-keywords                      189         0.002111307   1.117...e-05
org-time-stamp-to-now                                         56          0.0020589969  3.676...e-05
org-delete-all                                                260         0.0017148100  6.595...e-06
org-get-time-of-day                                           227         0.0015770929  6.947...e-06
org-plist-delete                                              227         0.0015161840  6.679...e-06
org-time-string-to-time                                       56          0.0014198770  2.535...e-05
org-agenda-prepare-window                                     1           0.001372594   0.001372594
org-get-todo-face                                             228         0.0013056910  5.726...e-06
org-make-options-regexp                                       63          0.0010650149  1.690...e-05
org-tag-alist-to-groups                                       63          0.001045388   1.659...e-05
org-agenda-entry-get-agenda-timestamp                         227         0.0010058660  4.431...e-06
org-agenda-new-marker                                         227         0.0009648590  4.250...e-06
org-agenda-today-p                                            63          0.0009215600  1.462...e-05
org-before-first-heading-p                                    112         0.0008890059  7.937...e-06
org-switch-to-buffer-other-window                             1           0.000725722   0.000725722
org-parse-time-string                                         56          0.0007051909  1.259...e-05
org-add-prop-inherited                                        322         0.0005647400  1.753...e-06
org-today                                                     64          0.0005097710  7.965...e-06
org-duration-to-minutes                                       36          0.000411925   1.144...e-05
org-downcase-keep-props                                       157         0.0004047279  2.577...e-06
org-agenda-get-category-icon                                  227         0.0004038980  1.779...e-06
org-agenda-fix-displayed-tags                                 227         0.0003932040  1.732...e-06
org-reduced-level                                             229         0.0003889510  1.698...e-06
org-habit-insert-consistency-graphs                           1           0.000366109   0.000366109
org-base-buffer                                               189         0.0003440420  1.820...e-06
org-element-property                                          213         0.0003374690  1.584...e-06
org-face-from-face-or-color                                   228         0.000335521   1.471...e-06
org-string-nw-p                                               63          0.0002892109  4.590...e-06
org-element--cache-put                                        189         0.0002775559  1.468...e-06
org-inlinetask-outline-regexp                                 74          0.000227332   3.072...e-06
org-element-link-parser                                       8           0.0002146920  2.683...e-05
org-end-of-subtree                                            3           0.000203309   6.776...e-05
org-property-inherit-p                                        126         0.0001907440  1.513...e-06
org-element-type                                              126         0.0001882889  1.494...e-06
org-agenda-reset-markers                                      1           0.000159588   0.000159588
org-agenda-fontify-priorities                                 1           0.000145829   0.000145829
org-in-commented-heading-p                                    2           0.000132559   6.62795e-05
org-not-nil                                                   72          0.0001174779  1.631...e-06
org-link-get-parameter                                        56          0.0001100720  1.965...e-06
org-file-menu-entry                                           63          9.959...e-05  1.580...e-06
org-heading-components                                        2           8.883...e-05  4.441...e-05
org-deadline-close-p                                          1           7.8711e-05    7.8711e-05
org-link-expand-abbrev                                        8           4.393e-05     5.49125e-06
org-agenda-fit-window-to-buffer                               1           4.2953e-05    4.2953e-05
org-compile-prefix-format                                     1           2.8356e-05    2.8356e-05
org-entry-is-done-p                                           1           2.8286e-05    2.8286e-05
org-agenda-propertize-selected-todo-keywords                  1           2.5771e-05    2.5771e-05
org-get-todo-state                                            1           2.2558e-05    2.2558e-05
org-agenda-mark-header-line                                   2           1.7461e-05    8.7305e-06
org-remove-flyspell-overlays-in                               8           1.375...e-05  1.719...e-06
org-agenda-span-name                                          3           1.0754e-05    3.584...e-06
org-get-wdays                                                 1           6.635e-06     6.635e-06
org-fit-window-to-buffer                                      1           6.216e-06     6.216e-06
org-unhighlight                                               1           5.657e-06     5.657e-06
org-agenda-set-mode-name                                      1           5.448e-06     5.448e-06
org-agenda-update-agenda-type                                 1           3.212e-06     3.212e-06
org-agenda-use-sticky-p                                       1           2.934e-06     2.934e-06
org-set-sorting-strategy                                      1           2.375e-06     2.375e-06
org-font-lock-add-tag-faces                                   1           1.885e-06     1.885e-06
org-agenda-mark-clocking-task                                 1           1.816e-06     1.816e-06

[-- Attachment #4: org-agenda-list-master.txt --]
[-- Type: text/plain, Size: 13369 bytes --]

org-agenda-list                                               1           1.036426005   1.036426005
org-agenda-prepare                                            1           0.59630983    0.59630983
org-agenda-prepare-buffers                                    1           0.584742966   0.584742966
org-agenda-get-day-entries                                    63          0.388804281   0.0061714965
org-agenda-get-scheduled                                      63          0.287089758   0.0045569802
org-refresh-category-properties                               63          0.280568592   0.0044534697
org-habit-parse-todo                                          30          0.178230735   0.0059410245
org-time-string-to-time                                       219         0.162822094   0.0007434798
org-refresh-properties                                        126         0.1037620009  0.0008235079
org-set-regexps-and-options                                   63          0.072436631   0.0011497877
org--setup-collect-keywords                                   63          0.067395964   0.0010697772
org-refresh-effort-properties                                 63          0.0601021349  0.0009540021
org-refresh-stats-properties                                  63          0.0527890429  0.0008379213
org-agenda-get-deadlines                                      63          0.0435562750  0.0006913694
org-entry-get                                                 379         0.0416739789  0.0001099577
org--property-local-values                                    319         0.0345025839  0.0001081585
org-get-property-block                                        357         0.034427862   9.643...e-05
org-is-habit-p                                                283         0.0338110170  0.0001194735
org-at-planning-p                                             442         0.032837713   7.429...e-05
org-inlinetask-in-task-p                                      778         0.0318480220  4.093...e-05
org-element-at-point                                          126         0.0292387819  0.0002320538
org-agenda-get-timestamps                                     63          0.0277296449  0.0004401530
org-element--parse-to                                         126         0.0248669199  0.0001973565
org-agenda-finalize                                           1           0.022978121   0.022978121
org-element--current-element                                  189         0.0186408240  9.862...e-05
org-back-to-heading                                           1649        0.0171956780  1.042...e-05
org-get-tags-at                                               168         0.013697585   8.153...e-05
org-agenda-finalize-entries                                   1           0.013196335   0.013196335
org-agenda--timestamp-to-absolute                             371         0.0128388810  3.460...e-05
org-agenda-get-blocks                                         63          0.0125374530  0.0001990071
org-agenda-get-sexps                                          63          0.012419771   0.0001971392
org-get-todo-state                                            384         0.0116516529  3.034...e-05
org-agenda-files                                              3           0.0112226859  0.0037408953
org-time-string-to-absolute                                   371         0.0111514519  3.005...e-05
org-agenda-skip                                               402         0.0101008230  2.512...e-05
org-closest-date                                              371         0.0091781489  2.473...e-05
org-up-heading-safe                                           156         0.0075428730  4.835...e-05
org-agenda-format-item                                        88          0.00725548    8.244...e-05
org-diary-sexp-entry                                          15          0.006813245   0.0004542163
org-get-limited-outline-regexp                                1343        0.0067914470  5.056...e-06
org-class                                                     14          0.0066119609  0.0004722829
org-agenda-highlight-todo                                     88          0.0063633260  7.231...e-05
org-at-property-p                                             38          0.0058275689  0.0001533570
org-element-keyword-parser                                    189         0.005708073   3.020...e-05
org-get-priority                                              54          0.0054412090  0.0001007631
org-parse-time-string                                         620         0.0051941760  8.377...e-06
org-check-agenda-file                                         126         0.0043125070  3.422...e-05
org-habit-insert-consistency-graphs                           1           0.004261796   0.004261796
org-entries-lessp                                             450         0.0038639119  8.586...e-06
org-get-agenda-file-buffer                                    126         0.0035695999  2.833...e-05
org-agenda-align-tags                                         1           0.003380815   0.003380815
org-before-first-heading-p                                    416         0.0032665500  7.852...e-06
org-refresh-property                                          36          0.0031427240  8.729...e-05
org-agenda-mode                                               1           0.00295639    0.00295639
org-find-base-buffer-visiting                                 126         0.002955972   2.346...e-05
org-outline-level                                             315         0.0029020649  9.212...e-06
org-at-heading-p                                              504         0.0028686700  5.691...e-06
org-element--collect-affiliated-keywords                      189         0.0027060039  1.431...e-05
org-inlinetask-outline-regexp                                 778         0.0024774190  3.184...e-06
org-entry-properties                                          60          0.0024010770  4.001...e-05
org-in-src-block-p                                            402         0.0022900930  5.696...e-06
org-get-scheduled-time                                        30          0.002265866   7.552...e-05
org-today                                                     347         0.0020586510  5.932...e-06
org-split-string                                              385         0.0019517840  5.069...e-06
org-add-props                                                 293         0.0019161000  6.539...e-06
org-habit-build-graph                                         30          0.001661114   5.537...e-05
org-activate-links                                            8           0.001602093   0.0002002616
org-make-options-regexp                                       63          0.0015062679  2.390...e-05
org-agenda-new-marker                                         168         0.0014047150  8.361...e-06
org-agenda-today-p                                            127         0.0014020659  1.103...e-05
org-get-wdays                                                 363         0.0013711919  3.777...e-06
org-date-to-gregorian                                         128         0.0013237060  1.034...e-05
org-heading-components                                        32          0.001303453   4.073...e-05
org-tag-alist-to-groups                                       63          0.0012910870  2.049...e-05
org-agenda-skip-eval                                          804         0.0012669809  1.575...e-06
org-remove-uninherited-tags                                   92          0.0009574620  1.040...e-05
org-replace-escapes                                           30          0.000812116   2.707...e-05
org-not-nil                                                   453         0.0007195149  1.588...e-06
org-get-time-of-day                                           69          0.0007169219  1.039...e-05
org-delete-all                                                92          0.000598125   6.501...e-06
org-add-prop-inherited                                        295         0.0005832480  1.977...e-06
org-plist-delete                                              76          0.000574936   7.564...e-06
org-agenda-add-time-grid-maybe                                1           0.000538617   0.000538617
org-at-date-range-p                                           79          0.0004922500  6.231...e-06
org-agenda-prepare-window                                     1           0.000491545   0.000491545
org-duration-to-minutes                                       36          0.0004866579  1.351...e-05
org-habit-get-faces                                           240         0.0004593440  1.913...e-06
org-get-todo-face                                             76          0.0004321060  5.685...e-06
org-get-category                                              84          0.0003631819  4.323...e-06
org-get-repeat                                                30          0.000358986   1.196...e-05
org-element-property                                          210         0.0003572420  1.701...e-06
org-string-nw-p                                               63          0.000357026   5.667...e-06
org-habit-get-priority                                        30          0.0003462759  1.154...e-05
org-element--cache-put                                        189         0.0003137309  1.659...e-06
org-switch-to-buffer-other-window                             1           0.000248566   0.000248566
org-habit-duration-to-days                                    37          0.0002319400  6.268...e-06
org-property-inherit-p                                        126         0.000210495   1.670...e-06
org-element-type                                              126         0.0002073539  1.645...e-06
org-end-of-subtree                                            3           0.0002047060  6.823...e-05
org-reduced-level                                             116         0.0001833389  1.580...e-06
org-element-link-parser                                       7           0.000181029   2.586...e-05
org-agenda-get-category-icon                                  88          0.0001658720  1.884...e-06
org-agenda-fix-displayed-tags                                 88          0.0001547720  1.758...e-06
org-in-commented-heading-p                                    2           0.000136471   6.82355e-05
org-downcase-keep-props                                       47          0.0001269050  2.700...e-06
org-face-from-face-or-color                                   76          0.0001116090  1.468...e-06
org-file-menu-entry                                           63          9.9037e-05    1.572...e-06
org-link-get-parameter                                        49          9.212...e-05  1.880...e-06
org-agenda-deadline-face                                      31          8.373...e-05  2.701...e-06
org-agenda-reset-markers                                      1           6.6629e-05    6.6629e-05
org-agenda-fontify-priorities                                 1           6.2299e-05    6.2299e-05
org-agenda-fit-window-to-buffer                               1           4.428e-05     4.428e-05
org-days-to-iso-week                                          3           4.281...e-05  1.427...e-05
org-agenda-span-name                                          7           4.260...e-05  6.085...e-06
org-compile-prefix-format                                     1           3.9182e-05    3.9182e-05
org-link-expand-abbrev                                        7           3.848...e-05  5.497...e-06
org-agenda-time-of-day-to-ampm-maybe                          19          3.261...e-05  1.716...e-06
org-agenda-format-date-aligned                                1           3.1638e-05    3.1638e-05
org-agenda-get-day-face                                       1           1.795e-05     1.795e-05
org-bbdb-anniversaries                                        1           1.1804e-05    1.1804e-05
org-remove-flyspell-overlays-in                               7           1.1666e-05    1.666...e-06
org-agenda-mark-header-line                                   1           8.939e-06     8.939e-06
org-fit-window-to-buffer                                      1           7.613e-06     7.613e-06
org-unhighlight                                               1           6.914e-06     6.914e-06
org-agenda-set-mode-name                                      1           4.959e-06     4.959e-06
org-agenda-ndays-to-span                                      2           3.353e-06     1.6765e-06
org-time-stamp-format                                         2           3.073e-06     1.5365e-06
org-agenda-update-agenda-type                                 1           2.933e-06     2.933e-06
org-set-sorting-strategy                                      1           2.305e-06     2.305e-06
org-agenda-span-to-ndays                                      1           2.095e-06     2.095e-06
org-agenda-mark-clocking-task                                 1           1.956e-06     1.956e-06
org-font-lock-add-tag-faces                                   1           1.885e-06     1.885e-06
org-agenda-use-sticky-p                                       1           1.885e-06     1.885e-06

[-- Attachment #5: org-agenda-list-wip.txt --]
[-- Type: text/plain, Size: 13148 bytes --]

org-agenda-list                                               1           1.37723502    1.37723502
org-agenda-prepare                                            1           0.594557456   0.594557456
org-agenda-prepare-buffers                                    1           0.582119253   0.582119253
org-agenda--all-filtered-data                                 1           0.307176728   0.307176728
org-agenda--file-data                                         63          0.279614084   0.0044383187
org-agenda-day-entries                                        53          0.2725648440  0.0051427329
org-agenda--entry-from-scheduled                              251         0.196999124   0.0007848570
org-entry-get                                                 378         0.1887249349  0.0004992723
org-is-habit-p                                                282         0.1811045989  0.0006422148
org-agenda-finalize                                           1           0.178296907   0.178296907
org-agenda-align-tags                                         1           0.158472831   0.158472831
org-add-props                                                 291         0.156753814   0.0005386729
org-refresh-category-properties                               63          0.1188651170  0.0018867478
org-refresh-properties                                        126         0.101092705   0.0008023230
org-set-regexps-and-options                                   63          0.06887764    0.0010932958
org--setup-collect-keywords                                   63          0.0639084160  0.0010144193
org-refresh-effort-properties                                 63          0.0600183150  0.0009526716
org-refresh-stats-properties                                  63          0.052917401   0.0008399587
org-get-agenda-file-buffer                                    242         0.0486033540  0.0002008403
org-find-base-buffer-visiting                                 242         0.0476266939  0.0001968045
org--property-local-values                                    318         0.029329983   9.223...e-05
org-get-property-block                                        356         0.0292983480  8.229...e-05
org-element-at-point                                          126         0.0290988850  0.0002309435
org-element--parse-to                                         126         0.0247488820  0.0001964196
org-habit-parse-todo                                          30          0.019273238   0.0006424412
org-element--current-element                                  189         0.0185681189  9.824...e-05
org-get-tags-at                                               166         0.0135738889  8.177...e-05
org-agenda-finalize-entries                                   1           0.013226504   0.013226504
org-agenda-files                                              3           0.0120801949  0.0040267316
org-agenda--entry-from-deadline                               112         0.0111729529  9.975...e-05
org-agenda--timestamp-to-absolute                             400         0.0111346139  2.783...e-05
org-inlinetask-in-task-p                                      356         0.0108578339  3.049...e-05
org-closest-date                                              371         0.0089632409  2.415...e-05
org-agenda-format-item                                        87          0.007807021   8.973...e-05
org-up-heading-safe                                           155         0.0076031540  4.905...e-05
org-agenda-skip                                               652         0.0070363279  1.079...e-05
org-get-priority                                              53          0.0069584450  0.0001312914
org-diary-sexp-entry                                          15          0.006780418   0.0004520278
org-class                                                     14          0.0065748069  0.0004696290
org-agenda-highlight-todo                                     87          0.0064343520  7.395...e-05
org-at-property-p                                             38          0.0058343460  0.0001535354
org-element-keyword-parser                                    189         0.0056909619  3.011...e-05
org-back-to-heading                                           840         0.0053527809  6.372...e-06
org-parse-time-string                                         621         0.0051560409  8.302...e-06
org-today                                                     819         0.0047459339  5.794...e-06
org-get-limited-outline-regexp                                922         0.0047142750  5.113...e-06
org-agenda-today-p                                            417         0.0046463610  1.114...e-05
org-check-agenda-file                                         126         0.0045869780  3.640...e-05
org-before-first-heading-p                                    394         0.004540541   1.152...e-05
org-habit-insert-consistency-graphs                           1           0.004465802   0.004465802
org-entries-lessp                                             449         0.0038742370  8.628...e-06
org-refresh-property                                          36          0.0031816959  8.838...e-05
org-agenda-skip-eval                                          1304        0.0029992030  2.300...e-06
org-agenda-mode                                               1           0.002943887   0.002943887
org-at-heading-p                                              504         0.0028957600  5.745...e-06
org-time-string-to-time                                       191         0.0028709060  1.503...e-05
org-element--collect-affiliated-keywords                      189         0.0026236509  1.388...e-05
org-agenda--get-tags                                          83          0.0025400630  3.060...e-05
org-get-scheduled-time                                        30          0.0022264779  7.421...e-05
org-entry-properties                                          60          0.002168161   3.613...e-05
org-outline-level                                             230         0.0021012530  9.135...e-06
org-split-string                                              385         0.0019619890  5.096...e-06
org-activate-links                                            8           0.001699033   0.0002123791
org-habit-build-graph                                         30          0.0016231110  5.410...e-05
org-make-options-regexp                                       63          0.0013530319  2.147...e-05
org-get-wdays                                                 363         0.0013218890  3.641...e-06
org-date-to-gregorian                                         128         0.0013000239  1.015...e-05
org-tag-alist-to-groups                                       63          0.0012771870  2.027...e-05
org-inlinetask-outline-regexp                                 356         0.0012392029  3.480...e-06
org-heading-components                                        32          0.00116747    3.648...e-05
org-remove-uninherited-tags                                   91          0.0009666059  1.062...e-05
org-replace-escapes                                           30          0.000802756   2.675...e-05
org-get-time-of-day                                           68          0.000764205   1.123...e-05
org-not-nil                                                   452         0.0007107110  1.572...e-06
org-agenda-new-marker                                         166         0.0006716600  4.046...e-06
org-add-prop-inherited                                        295         0.0006534500  2.215...e-06
org-delete-all                                                91          0.0006039900  6.637...e-06
org-plist-delete                                              76          0.0005782839  7.608...e-06
org-agenda-add-time-grid-maybe                                1           0.000531145   0.000531145
org-duration-to-minutes                                       36          0.0004908450  1.363...e-05
org-base-buffer                                               242         0.0004756870  1.965...e-06
org-agenda--entry-from-timestamp                              271         0.000437557   1.614...e-06
org-habit-get-faces                                           240         0.0004340680  1.808...e-06
org-get-todo-face                                             76          0.0004339970  5.710...e-06
org-get-repeat                                                30          0.0004023559  1.341...e-05
org-element-property                                          210         0.0003623260  1.725...e-06
org-string-nw-p                                               63          0.0003599629  5.713...e-06
org-habit-get-priority                                        30          0.0003363590  1.121...e-05
org-get-category                                              83          0.0003314659  3.993...e-06
org-element--cache-put                                        189         0.0003057629  1.617...e-06
org-element-link-parser                                       7           0.0002635799  3.765...e-05
org-property-inherit-p                                        126         0.0002432619  1.930...e-06
org-habit-duration-to-days                                    37          0.0002336210  6.314...e-06
org-element-type                                              126         0.0002093819  1.661...e-06
org-end-of-subtree                                            3           0.000204286   6.809...e-05
org-reduced-level                                             115         0.0001829870  1.591...e-06
org-agenda-fix-displayed-tags                                 87          0.0001569360  1.803...e-06
org-agenda-get-category-icon                                  87          0.000156099   1.794...e-06
org-downcase-keep-props                                       47          0.0001370319  2.915...e-06
org-in-commented-heading-p                                    2           0.000136471   6.82355e-05
org-face-from-face-or-color                                   76          0.0001129260  1.485...e-06
org-file-menu-entry                                           63          9.693...e-05  1.538...e-06
org-link-expand-abbrev                                        7           9.5544e-05    1.364...e-05
org-link-get-parameter                                        49          9.372...e-05  1.912...e-06
org-agenda-fontify-priorities                                 1           8.6463e-05    8.6463e-05
org-agenda-deadline-face                                      31          8.318...e-05  2.683...e-06
org-agenda-reset-markers                                      1           6.2857e-05    6.2857e-05
org-agenda-fit-window-to-buffer                               1           4.5606e-05    4.5606e-05
org-days-to-iso-week                                          3           4.3441e-05    1.448...e-05
org-agenda-span-name                                          8           4.155...e-05  5.194...e-06
org-compile-prefix-format                                     1           3.7574e-05    3.7574e-05
org-agenda-format-date-aligned                                1           3.3663e-05    3.3663e-05
org-agenda-time-of-day-to-ampm-maybe                          19          3.359...e-05  1.768...e-06
org-agenda-prepare-window                                     1           2.1302e-05    2.1302e-05
org-agenda-get-day-face                                       1           1.6692e-05    1.6692e-05
org-agenda-update-agenda-type                                 2           1.2921e-05    6.4605e-06
org-remove-flyspell-overlays-in                               7           1.1872e-05    1.696e-06
org-bbdb-anniversaries                                        1           1.1594e-05    1.1594e-05
org-agenda-mark-header-line                                   1           8.66e-06      8.66e-06
org-unhighlight                                               2           8.171e-06     4.0855e-06
org-fit-window-to-buffer                                      1           5.866e-06     5.866e-06
org-agenda-set-mode-name                                      1           5.169e-06     5.169e-06
org-time-stamp-format                                         2           3.771e-06     1.8855e-06
org-agenda-ndays-to-span                                      2           3.562e-06     1.781e-06
org-set-sorting-strategy                                      1           2.304e-06     2.304e-06
org-agenda-span-to-ndays                                      1           2.165e-06     2.165e-06
org-font-lock-add-tag-faces                                   1           2.025e-06     2.025e-06
org-agenda-mark-clocking-task                                 1           1.956e-06     1.956e-06
org-agenda-use-sticky-p                                       1           1.677e-06     1.677e-06
org-agenda--entry-from-diary                                  4           0             0.0
org-agenda--entry-from-range                                  14          0             0.0

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-30 18:54   ` Matt Lundin
  2017-09-30 19:53     ` Matt Lundin
@ 2017-10-01 17:13     ` Nicolas Goaziou
  1 sibling, 0 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-01 17:13 UTC (permalink / raw)
  To: Org Mode List

Hello,

Matt Lundin <mdl@imapmail.org> writes:

> I think I have a fairly standard setup (some customizations, additional
> features such as habits). I'll do some testing with minimal examples to
> see if I can find out why the new branch is so much slower in my case.

Are 1.4 s "so much slower" than of 1 s. Granted, this is a terrible 40%
slowdown, but, all things being equal, 1.4 s is still acceptable,
considering, IIUC, you are using the worst case scenario, i.e., a single
day view from a cold cache.

> In the meantime, I'd like to that the branch *not* be merged until we
> are sure that it is actually faster for the majority of use cases.

Feedback is welcome.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-30 19:03       ` Matt Lundin
@ 2017-10-01 17:33         ` Nicolas Goaziou
  2017-10-01 17:57           ` Samuel Wales
  2017-10-01 23:49           ` Matt Lundin
  0 siblings, 2 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-01 17:33 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Matt Lundin <mdl@imapmail.org> writes:

> I am finding that the branch is still much slower than the current
> master even when no agenda files have changed (i.e., when running
> org-agenda-redo in an existing agenda buffer without changing
> anything).

This is interesting. Could you provide a report of the second call to
the same view? Or better, both reports for the first and subsequent
view. The second view should definitely be faster.

> This is true even when I set org-element-use-cache to t.

This variable has nothing to do with the current patch set. You can
ignore it.

>> OTOH, displaying, e.g., a whole week, month, year should be a lot
>> faster.
>
> Is this an unavoidable trade-off? Since I am constantly refreshing
> single day agenda buffers and todo lists, I would much prefer a faster
> single day display to a faster week or month display.

Good question. 

Currently, Agenda is pretty much tailored for single day display. So,
this would be difficult to improve. Using a cache, we can avoid finding
again the same data, so we can speed up subsequent parsing. Yet, when
there is little data to find, the cache is not very helpful. Luckily, it
means the Agenda is quickly generated in those cases anyway.

However, current Agenda is terrible when displaying multiple days. Some
people wait more than 30 s for a month view. This is where the current
patch set really shines.

I can look into your issue with proper reports as there may be ways to
improve it, but I'm more interesting in, e.g., halving the 30 s from
a month view than reducing the 1 s it takes to display a day view.

Regards,

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-01 17:33         ` Nicolas Goaziou
@ 2017-10-01 17:57           ` Samuel Wales
  2017-10-01 17:58             ` Samuel Wales
  2017-10-01 22:59             ` Nicolas Goaziou
  2017-10-01 23:49           ` Matt Lundin
  1 sibling, 2 replies; 42+ messages in thread
From: Samuel Wales @ 2017-10-01 17:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

my use is similar to matt's in that i use a 2d view.

i am getting errors.  in particular, it crashes when it is looking for
log entries in a task that does not have log entries.  there is no
rhyme or reason and i have no mce.  i remove teh task and another task
produces teh error.

not ready fro prime time quite yet.

-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-01 17:57           ` Samuel Wales
@ 2017-10-01 17:58             ` Samuel Wales
  2017-10-01 22:59             ` Nicolas Goaziou
  1 sibling, 0 replies; 42+ messages in thread
From: Samuel Wales @ 2017-10-01 17:58 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

maybe it is trying to parse a link that looks like a log entry?

On 10/1/17, Samuel Wales <samologist@gmail.com> wrote:
> my use is similar to matt's in that i use a 2d view.
>
> i am getting errors.  in particular, it crashes when it is looking for
> log entries in a task that does not have log entries.  there is no
> rhyme or reason and i have no mce.  i remove teh task and another task
> produces teh error.
>
> not ready fro prime time quite yet.
>
> --
> The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>
>
> The disease DOES progress. MANY people have died from it. And ANYBODY
> can get it at any time.
>
> "You’ve really gotta quit this and get moving, because this is murder
> by neglect." ---
> <http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.
>


-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-01 17:57           ` Samuel Wales
  2017-10-01 17:58             ` Samuel Wales
@ 2017-10-01 22:59             ` Nicolas Goaziou
  1 sibling, 0 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-01 22:59 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> i am getting errors.  in particular, it crashes when it is looking for
> log entries in a task that does not have log entries.  there is no
> rhyme or reason and i have no mce.  i remove teh task and another task
> produces teh error.

What is a "crash"? If Emacs crashes, this should be reported to
Emacs-Devel. If there is an error, you should send the backtrace here.

In any case, I fixed an issue with log entries. It could be worth
testing it again.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-01 17:33         ` Nicolas Goaziou
  2017-10-01 17:57           ` Samuel Wales
@ 2017-10-01 23:49           ` Matt Lundin
  1 sibling, 0 replies; 42+ messages in thread
From: Matt Lundin @ 2017-10-01 23:49 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 2938 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Matt Lundin <mdl@imapmail.org> writes:
>
>> I am finding that the branch is still much slower than the current
>> master even when no agenda files have changed (i.e., when running
>> org-agenda-redo in an existing agenda buffer without changing
>> anything).
>
> This is interesting. Could you provide a report of the second call to
> the same view? Or better, both reports for the first and subsequent
> view. The second view should definitely be faster.

I've attached the profiling for master and the wip branch. Both were run
with identical agenda files and identical configurations

The first pair of files profiles calling org-agenda-list immediately
after emacs has started up (i.e., before opening agenda files). The
total times are:

master: 5.014304355
wip:    6.68215677

The second pair of files profiles calling org-agenda-redo immediately
after generating the agenda with org-agenda-list (i.e., without changing
anything in the agenda files). Note: repeating the redo after that
results in virtually identical times.

master: 0.979825959
wip:    1.178702222

The third pair of files profiles calling org-agenda-redo after
changing (rescheduling) one item in the agenda.

master: 0.979580617
wip:    1.189759099

> I can look into your issue with proper reports as there may be ways to
> improve it, but I'm more interesting in, e.g., halving the 30 s from
> a month view than reducing the 1 s it takes to display a day view.

I agree it is important to reduce the time it takes to display a month
view. Thanks for all your work on this! I'd like to clarify that I am
not asking for further reductions from what the master branch of
org-mode has already achieved. Rather, I am concerned with regressions
from those times. The gap in time above, of course, is not particularly
big. But I'm running into some slower times (e.g., a 1 second
difference) on some of my other custom agenda commands. Take, for
instance, the following command:

--8<---------------cut here---------------start------------->8---
(org-add-agenda-custom-command
 '("q" "Projects"
   ((stuck "")
    (agenda ""                    
            ((org-agenda-include-deadlines t)
             (org-agenda-entry-types '(:deadline))
             ;; (org-agenda-skip-function
             ;;  '(org-agenda-skip-entry-if 'notregexp ":PROJ:"))
             (org-agenda-include-diary nil)
             (org-agenda-time-grid nil)))
    (todo "PROJECT"
          ((org-agenda-todo-ignore-deadlines t)
           (org-agenda-prefix-format " %i %-12:c%l"))))
   ((org-deadline-warning-days 365))))
--8<---------------cut here---------------end--------------->8---

The startup times weren't that far apart.

master: 5.728477902
wip:    6.68639764

But running org-agenda-redo results in a 1s gap (see the last two
attached files for profiling information):

master:   2.14623279
wip:      3.125571084

Best,
Matt


[-- Attachment #2: org-agenda-master-org-agenda-list-immediately-after-startup.txt --]
[-- Type: text/plain, Size: 19007 bytes --]

org-agenda-list                                               1           5.014304355   5.014304355
org-agenda-prepare-buffers                                    2           3.7477554480  1.8738777240
org-agenda-prepare                                            1           3.303024766   3.303024766
org-get-agenda-file-buffer                                    252         2.8621154540  0.0113576010
org-mode                                                      63          2.021190203   0.0320823841
org-agenda-get-day-entries                                    126         1.043993129   0.0082856597
org-set-startup-visibility                                    63          0.9549281500  0.0151575896
org-element-at-point                                          1863        0.8281850030  0.0004445437
org-cycle-hide-drawers                                        82          0.8039815459  0.009804653
org-element--parse-to                                         1863        0.7838064640  0.0004207227
org-diary-sexp-entry                                          30          0.6159707919  0.0205323597
org-agenda-finalize                                           1           0.61469385    0.61469385
org-agenda-get-sexps                                          126         0.60418644    0.0047951304
org-element--current-element                                  3412        0.5537156270  0.0001622847
org-agenda-to-appt                                            1           0.513418731   0.513418731
org-set-regexps-and-options                                   189         0.2761626890  0.0014611782
org-refresh-category-properties                               126         0.271197041   0.0021523574
org-install-agenda-files-menu                                 63          0.2459687320  0.0039042655
org-refresh-effort-properties                                 189         0.2442077130  0.0012921043
org--setup-collect-keywords                                   189         0.2426440819  0.0012838311
org-refresh-properties                                        315         0.2426330309  0.0007702635
org-clock-load                                                63          0.2422789369  0.0038456974
org-agenda-files                                              67          0.232646328   0.0034723332
org-agenda-get-scheduled                                      63          0.1954322100  0.0031020985
org-bookmark-jump-unhide                                      64          0.1809375679  0.0028271494
org-show-context                                              32          0.179909065   0.0056221582
org-show-set-visibility                                       32          0.1797428540  0.0056169641
org-overview                                                  63          0.1222491819  0.0019404632
org-element-planning-parser                                   1105        0.1157947479  0.0001047916
org-agenda-get-deadlines                                      63          0.107595332   0.0017078624
org-flag-drawer                                               1485        0.1058508040  7.128...e-05
org-show-siblings                                             32          0.1019572649  0.0031861645
org-agenda-get-timestamps                                     126         0.0999657039  0.0007933786
org-element-timestamp-parser                                  1281        0.0942586930  7.358...e-05
org-refresh-stats-properties                                  126         0.0941737439  0.0007474106
org-element-drawer-parser                                     1151        0.0898642389  7.807...e-05
org-agenda-finalize-entries                                   1           0.089031392   0.089031392
org-agenda-highlight-todo                                     89          0.082351875   0.0009253019
org-habit-insert-consistency-graphs                           1           0.0818362     0.0818362
org-element-keyword-parser                                    567         0.0759054819  0.0001338721
org-agenda-skip                                               439         0.0754520269  0.0001718724
org-show-entry                                                19          0.0725537900  0.0038186205
org-flag-heading                                              574         0.0707328899  0.0001232280
org-find-invisible-foreground                                 63          0.065369126   0.0010376051
org-class                                                     28          0.059034581   0.0021083778
org-entry-get                                                 451         0.0533241459  0.0001182353
org-get-property-block                                        503         0.0506097740  0.0001006158
org-find-base-buffer-visiting                                 252         0.0477289049  0.0001894004
org--property-local-values                                    391         0.0451494760  0.0001154718
org-inlinetask-in-task-p                                      978         0.0438832379  4.487...e-05
org-macro-initialize-templates                                63          0.0429574960  0.0006818650
org-get-limited-outline-regexp                                9996        0.0427891079  4.280...e-06
org-cycle-show-empty-lines                                    63          0.042085778   0.0006680282
org-outline-level                                             6997        0.0420775299  6.013...e-06
org-at-planning-p                                             515         0.0386100229  7.497...e-05
org-babel-hide-all-hashes                                     63          0.038308202   0.0006080666
org-macro--collect-macros                                     63          0.0381516249  0.0006055813
org-set-visibility-according-to-property                      63          0.0369298239  0.0005861876
org-update-radio-target-regexp                                63          0.036547812   0.000580124
org-is-habit-p                                                283         0.0350393229  0.0001238138
org-at-heading-p                                              7087        0.0301326190  4.251...e-06
org-goto-sibling                                              582         0.0294460370  5.059...e-05
org-load-modules-maybe                                        63          0.0284080190  0.0004509209
org-back-to-heading                                           3181        0.0265658979  8.351...e-06
org-agenda-get-blocks                                         126         0.0254597190  0.0002020612
org-cycle-hide-archived-subtrees                              63          0.01980918    0.0003144314
org-habit-parse-todo                                          30          0.0192084680  0.0006402822
org-hide-archived-subtrees                                    63          0.0192016640  0.0003047883
org-at-property-p                                             112         0.0153644349  0.0001371824
org-element--collect-affiliated-keywords                      1778        0.0150712580  8.476...e-06
org-parse-time-string                                         1937        0.0141927179  7.327...e-06
org-get-tags-at                                               169         0.0138630449  8.202...e-05
org-agenda--timestamp-to-absolute                             379         0.0134403269  3.546...e-05
org-get-todo-state                                            403         0.0125026849  3.102...e-05
org-time-string-to-absolute                                   379         0.0117144259  3.090...e-05
org-element-property-drawer-parser                            527         0.00980671    1.860...e-05
org-up-heading-safe                                           214         0.0097815569  4.570...e-05
org-closest-date                                              379         0.009696489   2.558...e-05
org-refresh-property                                          108         0.009527495   8.821...e-05
org-make-options-regexp                                       189         0.0089472200  4.733...e-05
org-element-property                                          5106        0.0080727480  1.581...e-06
org-agenda-format-item                                        90          0.0072306019  8.034...e-05
org-file-menu-entry                                           4032        0.0064107479  1.589...e-06
org-days-to-iso-week                                          3           0.00610902    0.0020363399
org-check-agenda-file                                         189         0.0059255519  3.135...e-05
org-get-priority                                              55          0.0053857800  9.792...e-05
org-before-first-heading-p                                    674         0.0053656269  7.960...e-06
org-element--cache-put                                        3412        0.0051148979  1.499...e-06
org-element-type                                              3348        0.0049542939  1.479...e-06
org-split-string                                              987         0.0043216689  4.378...e-06
org-entries-lessp                                             449         0.0038916190  8.667...e-06
org-agenda-align-tags                                         1           0.003709336   0.003709336
org-time-string-to-time                                       247         0.003696355   1.4965e-05
org-agenda-mode                                               1           0.003627291   0.003627291
org-link-set-parameters                                       8           0.003434467   0.0004293083
org-inlinetask-outline-regexp                                 978         0.0031929680  3.264...e-06
org-tag-alist-to-groups                                       189         0.0031837440  1.684...e-05
org-in-src-block-p                                            439         0.0029238009  6.660...e-06
org-today                                                     410         0.0024848829  6.060...e-06
org-entry-properties                                          60          0.0024399710  4.066...e-05
org-get-scheduled-time                                        30          0.0023343810  7.781...e-05
org-make-link-regexps                                         8           0.002167688   0.000270961
org-element-paragraph-parser                                  59          0.0020928170  3.547...e-05
org-extract-log-state-settings                                567         0.0020570600  3.627...e-06
org-add-props                                                 298         0.0019287600  6.472...e-06
org-set-font-lock-defaults                                    63          0.0019009039  3.017...e-05
org-activate-links                                            8           0.001813953   0.0002267441
org-habit-build-graph                                         30          0.0017106590  5.702...e-05
org-agenda-new-marker                                         170         0.0015996959  9.409...e-06
org-add-prop-inherited                                        871         0.0015693989  1.801...e-06
org-date-to-gregorian                                         145         0.0015271380  1.053...e-05
org-heading-components                                        34          0.0014513579  4.268...e-05
org-agenda-today-p                                            127         0.0014098020  1.110...e-05
org-get-wdays                                                 363         0.0014058969  3.872...e-06
org-agenda-skip-eval                                          878         0.0013714789  1.562...e-06
org-element-update-syntax                                     8           0.0011961760  0.0001495220
org-string-nw-p                                               252         0.0011462430  4.548...e-06
org-element--set-regexps                                      8           0.001029264   0.000128658
org-defkey                                                    126         0.0010040499  7.968...e-06
org-remove-uninherited-tags                                   94          0.0009766069  1.038...e-05
org-not-nil                                                   597         0.0009582260  1.605...e-06
org-at-date-range-p                                           152         0.0009382659  6.172...e-06
org-replace-escapes                                           30          0.0008462849  2.820...e-05
org-delete-all                                                157         0.000770377   4.906...e-06
org-setup-filling                                             63          0.000715483   1.135...e-05
org-remove-keyword-keys                                       189         0.000660519   3.494...e-06
org-get-time-of-day                                           59          0.000653262   1.107...e-05
org-agenda-add-time-grid-maybe                                1           0.000624136   0.000624136
org-plist-delete                                              77          0.0005977350  7.762...e-06
org-property-inherit-p                                        315         0.0005119040  1.625...e-06
org-habit-get-faces                                           240         0.0004546350  1.894...e-06
org-get-todo-face                                             77          0.0004443080  5.770...e-06
org-end-of-subtree                                            6           0.000425307   7.08845e-05
org-invisible-p                                               94          0.000410165   4.363...e-06
org-get-category                                              85          0.000382984   4.505...e-06
org-get-repeat                                                30          0.0003628710  1.209...e-05
org-macro--counter-initialize                                 63          0.0003468850  5.506...e-06
org-setup-comments-handling                                   63          0.0003222330  5.114...e-06
org-habit-get-priority                                        30          0.0003151739  1.050...e-05
org-element-inlinetask-parser                                 2           0.000314408   0.000157204
org-in-commented-heading-p                                    4           0.000282631   7.065775e-05
org-habit-duration-to-days                                    37          0.000242892   6.564...e-06
org-element-cache-reset                                       71          0.0002388419  3.363...e-06
org-agenda-prepare-window                                     1           0.000235912   0.000235912
org-assign-fast-keys                                          63          0.0002330480  3.699...e-06
org-element-link-parser                                       7           0.0002265539  3.236...e-05
org-compute-latex-and-related-regexp                          63          0.000223339   3.545...e-06
org-switch-to-buffer-other-window                             1           0.000212725   0.000212725
org--update-property-plist                                    63          0.0002042809  3.242...e-06
org-key                                                       126         0.0001971519  1.564...e-06
org-reduced-level                                             121         0.0001942779  1.605...e-06
org-agenda-get-category-icon                                  90          0.0001631430  1.812...e-06
org-agenda-fix-displayed-tags                                 90          0.0001599210  1.7769e-06
org-element--get-time-properties                              2           0.0001529440  7.647...e-05
org-babel-result-hide-spec                                    63          0.0001427469  2.265...e-06
org-item-re                                                   59          0.0001322029  2.240...e-06
org-downcase-keep-props                                       48          0.000129405   2.695...e-06
org-agenda-format-date-aligned                                1           0.000115721   0.000115721
org-face-from-face-or-color                                   77          0.0001138340  1.478...e-06
org-link-get-parameter                                        49          0.0001129300  2.304...e-06
org-clock-history-push                                        10          0.000103432   1.03432e-05
org-agenda-deadline-face                                      30          8.659...e-05  2.886...e-06
org-link-types                                                24          7.137...e-05  2.973...e-06
org-babel-hide-hash                                           14          6.8649e-05    4.9035e-06
org-agenda-fontify-priorities                                 1           6.844e-05     6.844e-05
org-element-table-parser                                      1           4.309e-05     4.309e-05
org-agenda-fit-window-to-buffer                               1           4.2112e-05    4.2112e-05
org-link-expand-abbrev                                        7           4.029...e-05  5.756...e-06
org-compile-prefix-format                                     1           3.4989e-05    3.4989e-05
org-agenda-time-of-day-to-ampm-maybe                          15          2.6746e-05    1.783...e-06
org-element--get-node-properties                              2           2.367...e-05  1.183...e-05
org-agenda-span-name                                          6           2.2e-05       3.666...e-06
org-base-buffer                                               10          1.8088e-05    1.8088e-06
org-agenda-get-day-face                                       1           1.7041e-05    1.7041e-05
org-remove-flyspell-overlays-in                               7           1.243...e-05  1.776...e-06
org-agenda-mark-header-line                                   1           1.0336e-05    1.0336e-05
org-fit-window-to-buffer                                      1           6.146e-06     6.146e-06
org-agenda-update-agenda-type                                 1           6.006e-06     6.006e-06
org-agenda-set-mode-name                                      1           4.819e-06     4.819e-06
org-unhighlight                                               1           4.4e-06       4.4e-06
org-agenda-ndays-to-span                                      2           3.702...e-06  1.851...e-06
org-agenda-use-sticky-p                                       1           2.864e-06     2.864e-06
org-agenda-reset-markers                                      1           2.375e-06     2.375e-06
org-time-stamp-format                                         1           2.165e-06     2.165e-06
org-set-sorting-strategy                                      1           2.095e-06     2.095e-06
org-font-lock-add-tag-faces                                   1           1.955e-06     1.955e-06
org-agenda-mark-clocking-task                                 1           1.885e-06     1.885e-06
org-release-buffers                                           1           1.885e-06     1.885e-06
org-agenda-span-to-ndays                                      1           1.816e-06     1.816e-06

[-- Attachment #3: org-agenda-wip-org-agenda-list-immediately-after-startup.txt --]
[-- Type: text/plain, Size: 19405 bytes --]

org-agenda-list                                               1           6.68215677    6.68215677
org-agenda-prepare-buffers                                    2           4.295328663   2.1476643315
org-agenda-prepare                                            1           3.825735447   3.825735447
org-get-agenda-file-buffer                                    431         3.5135765329  0.0081521497
org-mode                                                      63          2.3345882109  0.0370569557
org-agenda--file-data                                         126         1.2726260759  0.0101002069
org-set-startup-visibility                                    63          1.003786627   0.0159331210
org-agenda--all-filtered-data                                 1           0.987440253   0.987440253
org-agenda-finalize                                           1           0.941484715   0.941484715
org-agenda-day-entries                                        116         0.9252220049  0.0079760517
org-agenda-to-appt                                            1           0.825320403   0.825320403
org-cycle-hide-drawers                                        82          0.7148205160  0.0087173233
org-diary-sexp-entry                                          30          0.6945759269  0.0231525308
org-element-at-point                                          1863        0.6079532590  0.0003263302
org-element--parse-to                                         1863        0.5613532889  0.0003013168
org-element--current-element                                  3412        0.3133161649  9.182...e-05
org-set-regexps-and-options                                   189         0.2924581660  0.0015473977
org-clock-load                                                63          0.2816540160  0.0044706986
org-install-agenda-files-menu                                 63          0.2601424100  0.0041292446
org-agenda-files                                              67          0.2454113430  0.0036628558
org-refresh-properties                                        315         0.2450563019  0.0007779565
org-agenda--planning-data                                     62          0.2285784310  0.0036867488
org-refresh-category-properties                               126         0.2099981789  0.0016666522
org--setup-collect-keywords                                   189         0.1880786989  0.0009951253
org-refresh-effort-properties                                 189         0.1667941720  0.0008825088
org-entry-get                                                 451         0.1399870709  0.0003103926
org-load-modules-maybe                                        63          0.1311067489  0.0020810595
org-bookmark-jump-unhide                                      64          0.127148709   0.0019866985
org-show-context                                              32          0.126212074   0.0039441273
org-show-set-visibility                                       32          0.126050499   0.0039390780
org-find-base-buffer-visiting                                 431         0.1243680169  0.0002885568
org-overview                                                  63          0.123274479   0.0019567377
org-is-habit-p                                                283         0.1215144670  0.0004293797
org-cycle-show-empty-lines                                    63          0.114722404   0.0018209905
org-flag-drawer                                               1485        0.1142874429  7.696...e-05
org-outline-level                                             6912        0.1127813540  1.631...e-05
org-show-siblings                                             32          0.1117467139  0.0034920848
org-goto-sibling                                              582         0.1007586120  0.0001731247
org-agenda-align-tags                                         1           0.096505803   0.096505803
org-refresh-stats-properties                                  126         0.0947830949  0.0007522467
org-agenda--timestamp-data                                    62          0.0868529400  0.0014008538
org-link-set-parameters                                       8           0.086400429   0.0108000536
org-make-link-regexps                                         8           0.0840994660  0.0105124332
org-class                                                     28          0.0593491310  0.0021196118
org-element-planning-parser                                   1105        0.0527156439  4.770...e-05
org-get-limited-outline-regexp                                9884        0.0494797649  5.006...e-06
org-macro-initialize-templates                                63          0.0470132319  0.0007462417
org-get-property-block                                        503         0.0466871930  9.281...e-05
org-agenda--entry-from-scheduled                              251         0.0465347799  0.0001853975
org-macro--collect-macros                                     63          0.0420498389  0.0006674577
org--property-local-values                                    391         0.0412955420  0.0001056151
org-update-radio-target-regexp                                63          0.039036171   0.0006196217
org-babel-hide-all-hashes                                     63          0.0387429640  0.0006149676
org-set-visibility-according-to-property                      63          0.0374946319  0.0005951528
org-agenda--diary-data                                        63          0.0356025530  0.0005651198
org-inlinetask-in-task-p                                      866         0.0321910949  3.717...e-05
org-element-timestamp-parser                                  1281        0.0309066839  2.412...e-05
org-at-heading-p                                              7087        0.0301756100  4.257...e-06
org-at-planning-p                                             649         0.0295014780  4.545...e-05
org-element-drawer-parser                                     1151        0.0289824309  2.518...e-05
org-habit-parse-todo                                          30          0.0202837929  0.0006761264
org-cycle-hide-archived-subtrees                              63          0.0201682579  0.0003201310
org-hide-archived-subtrees                                    63          0.0195146939  0.0003097570
org-back-to-heading                                           2666        0.0176078210  6.604...e-06
org-element--collect-affiliated-keywords                      1778        0.0158021920  8.887...e-06
org-at-property-p                                             112         0.0156044130  0.0001393251
org-parse-time-string                                         1939        0.0142942699  7.371...e-06
org-get-tags-at                                               169         0.0137641300  8.144...e-05
org-element-keyword-parser                                    567         0.0137622069  2.427...e-05
org-agenda-finalize-entries                                   1           0.013392046   0.013392046
org-agenda--timestamp-to-absolute                             437         0.0121924789  2.790...e-05
org-agenda--entry-from-deadline                               112         0.010932131   9.760...e-05
org-element-property-drawer-parser                            527         0.0099832029  1.894...e-05
org-up-heading-safe                                           214         0.009803365   4.581...e-05
org-refresh-property                                          108         0.0096857829  8.968...e-05
org-closest-date                                              379         0.0093696739  2.472...e-05
org-flag-heading                                              574         0.0092505699  1.611...e-05
org-show-entry                                                19          0.009135804   0.0004808317
org-make-options-regexp                                       189         0.0089073850  4.712...e-05
org-element-property                                          5106        0.0081370810  1.593...e-06
org-agenda-skip                                               653         0.0078454369  1.201...e-05
org-agenda-format-item                                        90          0.0076535959  8.503...e-05
org-get-priority                                              55          0.0068311310  0.0001242023
org-file-menu-entry                                           4032        0.0065003270  1.612...e-06
org-agenda-highlight-todo                                     89          0.0064651140  7.264...e-05
org-days-to-iso-week                                          3           0.006299532   0.002099844
org-before-first-heading-p                                    634         0.0062946930  9.928...e-06
org-check-agenda-file                                         189         0.006288692   3.327...e-05
org-agenda-today-p                                            480         0.0055292649  1.151...e-05
org-today                                                     890         0.0053545810  6.016...e-06
org-element--cache-put                                        3412        0.0052792719  1.547...e-06
org-element-type                                              3348        0.0050802179  1.517...e-06
org-split-string                                              987         0.0043938540  4.451...e-06
org-habit-insert-consistency-graphs                           1           0.004165934   0.004165934
org-agenda-skip-eval                                          1306        0.0039719019  3.041...e-06
org-entries-lessp                                             449         0.0038765200  8.633...e-06
org-agenda-mode                                               1           0.003698178   0.003698178
org-find-invisible-foreground                                 63          0.0036904679  5.857...e-05
org-tag-alist-to-groups                                       189         0.0032449790  1.716...e-05
org-time-string-to-time                                       191         0.0028898949  1.513...e-05
org-inlinetask-outline-regexp                                 866         0.0028453529  3.285...e-06
org-agenda--get-tags                                          85          0.0026608019  3.130...e-05
org-get-scheduled-time                                        30          0.0022595889  7.531...e-05
org-entry-properties                                          60          0.0022521889  3.753...e-05
org-element-update-syntax                                     8           0.0022024429  0.0002753053
org-extract-log-state-settings                                567         0.0021418350  3.777...e-06
org-match-line                                                286         0.0020874080  7.298...e-06
org-add-props                                                 298         0.0020276989  6.804...e-06
org-set-font-lock-defaults                                    63          0.0019671899  3.122...e-05
org-in-src-block-p                                            286         0.0018386829  6.428...e-06
org-element-paragraph-parser                                  59          0.0017707649  3.001...e-05
org-activate-links                                            8           0.001706508   0.0002133135
org-element--set-regexps                                      8           0.001662482   0.0002078102
org-add-prop-inherited                                        871         0.0015977189  1.834...e-06
org-habit-build-graph                                         30          0.001573564   5.245...e-05
org-date-to-gregorian                                         145         0.0015229350  1.050...e-05
org-heading-components                                        34          0.0014626170  4.301...e-05
org-get-wdays                                                 363         0.0013208690  3.638...e-06
org-string-nw-p                                               252         0.0011374479  4.513...e-06
org-not-nil                                                   597         0.0010046300  1.682...e-06
org-remove-uninherited-tags                                   94          0.000979494   1.042...e-05
org-defkey                                                    126         0.0009786769  7.767...e-06
org-replace-escapes                                           30          0.00084006    2.8002e-05
org-delete-all                                                157         0.0008015899  5.105...e-06
org-agenda--entry-from-timestamp                              544         0.0007965559  1.464...e-06
org-agenda-new-marker                                         170         0.000749362   4.408...e-06
org-setup-filling                                             63          0.0007434309  1.180...e-05
org-base-buffer                                               383         0.0007081569  1.848...e-06
org-get-time-of-day                                           59          0.0006567610  1.113...e-05
org-remove-keyword-keys                                       189         0.0006388280  3.380...e-06
org-plist-delete                                              77          0.0006094939  7.915...e-06
org-element-cache-reset                                       71          0.0005852790  8.243...e-06
org-agenda-add-time-grid-maybe                                1           0.000566905   0.000566905
org-property-inherit-p                                        315         0.0005303190  1.683...e-06
org-get-todo-face                                             77          0.0004558800  5.920...e-06
org-habit-get-faces                                           240         0.0004393370  1.830...e-06
org-end-of-subtree                                            6           0.000424114   7.068...e-05
org-get-repeat                                                30          0.0004160129  1.386...e-05
org-invisible-p                                               94          0.0003665840  3.899...e-06
org-habit-get-priority                                        30          0.0003652510  1.217...e-05
org-get-category                                              85          0.0003505130  4.123...e-06
org-setup-comments-handling                                   63          0.0003461290  5.494...e-06
org-macro--counter-initialize                                 63          0.0003419300  5.427...e-06
org-element-inlinetask-parser                                 2           0.000312539   0.0001562695
org-in-commented-heading-p                                    4           0.0003024810  7.562...e-05
org-habit-duration-to-days                                    37          0.0002468310  6.671...e-06
org-agenda-prepare-window                                     1           0.000238315   0.000238315
org-assign-fast-keys                                          63          0.0002332160  3.701...e-06
org-compute-latex-and-related-regexp                          63          0.0002252589  3.575...e-06
org-switch-to-buffer-other-window                             1           0.000215692   0.000215692
org-key                                                       126         0.0002043759  1.622...e-06
org-element-link-parser                                       7           0.0001968359  2.811...e-05
org-reduced-level                                             121         0.0001911749  1.579...e-06
org--update-property-plist                                    63          0.0001792419  2.845...e-06
org-agenda-get-category-icon                                  90          0.0001633850  1.815...e-06
org-agenda-fix-displayed-tags                                 90          0.0001619899  1.799...e-06
org-element--get-time-properties                              2           0.0001542429  7.712...e-05
org-babel-result-hide-spec                                    63          0.000141185   2.241...e-06
org-item-re                                                   59          0.0001389509  2.355...e-06
org-downcase-keep-props                                       48          0.0001271510  2.648...e-06
org-face-from-face-or-color                                   77          0.000121353   1.576...e-06
org-agenda-format-date-aligned                                1           0.000120517   0.000120517
org-clock-history-push                                        10          9.985...e-05  9.9853e-06
org-link-get-parameter                                        49          9.908...e-05  2.022...e-06
org-link-types                                                24          9.656...e-05  4.023...e-06
org-agenda-deadline-face                                      30          7.911...e-05  2.637...e-06
org-agenda-fontify-priorities                                 1           7.2059e-05    7.2059e-05
org-babel-hide-hash                                           14          6.842...e-05  4.887...e-06
org-link-expand-abbrev                                        7           4.0218e-05    5.745...e-06
org-agenda-fit-window-to-buffer                               1           3.9102e-05    3.9102e-05
org-compile-prefix-format                                     1           3.7147e-05    3.7147e-05
org-element-table-parser                                      1           3.0095e-05    3.0095e-05
org-agenda-time-of-day-to-ampm-maybe                          15          2.667...e-05  1.778...e-06
org-element--get-node-properties                              2           2.401...e-05  1.200...e-05
org-agenda-span-name                                          6           2.3321e-05    3.886...e-06
org-agenda-get-day-face                                       1           1.6688e-05    1.6688e-05
org-remove-flyspell-overlays-in                               7           1.180...e-05  1.685...e-06
org-agenda-mark-header-line                                   1           1.0125e-05    1.0125e-05
org-agenda-update-agenda-type                                 1           7.192e-06     7.192e-06
org-fit-window-to-buffer                                      1           5.725e-06     5.725e-06
org-agenda-set-mode-name                                      1           4.818e-06     4.818e-06
org-unhighlight                                               1           4.748e-06     4.748e-06
org-agenda-ndays-to-span                                      2           3.77e-06      1.885e-06
org-agenda-use-sticky-p                                       1           3.073e-06     3.073e-06
org-set-sorting-strategy                                      1           2.444e-06     2.444e-06
org-agenda-span-to-ndays                                      1           2.165e-06     2.165e-06
org-time-stamp-format                                         1           2.025e-06     2.025e-06
org-agenda-mark-clocking-task                                 1           1.885e-06     1.885e-06
org-agenda-reset-markers                                      1           1.885e-06     1.885e-06
org-release-buffers                                           1           1.815e-06     1.815e-06
org-font-lock-add-tag-faces                                   1           1.746e-06     1.746e-06
org-agenda--entry-from-diary                                  8           0             0.0
org-agenda--entry-from-range                                  28          0             0.0

[-- Attachment #4: org-agenda-master-org-agenda-list-redo-no-change.txt --]
[-- Type: text/plain, Size: 13265 bytes --]

org-agenda-redo                                               1           0.979825959   0.979825959
org-let                                                       1           0.979240108   0.979240108
org-agenda-list                                               1           0.979224466   0.979224466
org-agenda-prepare                                            1           0.464468179   0.464468179
org-agenda-prepare-buffers                                    1           0.448116034   0.448116034
org-agenda-get-day-entries                                    63          0.3852574129  0.0061151970
org-agenda-get-scheduled                                      63          0.2838168739  0.0045050297
org-set-regexps-and-options                                   63          0.1387157649  0.0022018375
org--setup-collect-keywords                                   63          0.134480106   0.0021346048
org-entry-get                                                 378         0.1191641150  0.0003152489
org--property-local-values                                    318         0.112107781   0.0003525401
org-is-habit-p                                                282         0.1120790180  0.0003974433
org-get-property-block                                        356         0.1113595639  0.0003128077
org-inlinetask-in-task-p                                      775         0.1092605300  0.0001409813
org-agenda-finalize                                           1           0.102805762   0.102805762
org-refresh-category-properties                               63          0.1026363540  0.0016291484
org-element-at-point                                          126         0.102466009   0.0008132222
org-element--parse-to                                         126         0.098931636   0.0007851717
org-habit-parse-todo                                          30          0.0967458510  0.0032248617
org-element--current-element                                  189         0.0938215590  0.0004964103
org-refresh-properties                                        126         0.0915379470  0.0007264916
org-agenda-align-tags                                         1           0.083599029   0.083599029
org-inlinetask-outline-regexp                                 775         0.0806414769  0.0001040535
org-refresh-effort-properties                                 63          0.0530696539  0.0008423754
org-refresh-stats-properties                                  63          0.0470405400  0.0007466752
org-agenda-get-deadlines                                      63          0.0425290820  0.0006750647
org-at-planning-p                                             439         0.032045798   7.299...e-05
org-agenda-get-timestamps                                     63          0.0280069880  0.0004445553
org-back-to-heading                                           1647        0.0169384599  1.028...e-05
org-agenda-files                                              3           0.0144429770  0.0048143256
org-get-tags-at                                               168         0.013718498   8.165...e-05
org-agenda--timestamp-to-absolute                             371         0.0129551189  3.491...e-05
org-agenda-get-sexps                                          63          0.0126358990  0.0002005698
org-agenda-get-blocks                                         63          0.0124867439  0.0001982022
org-agenda-finalize-entries                                   1           0.012337918   0.012337918
org-time-string-to-absolute                                   371         0.0112721510  3.038...e-05
org-get-todo-state                                            383         0.0112451349  2.936...e-05
org-agenda-skip                                               401         0.0096818610  2.414...e-05
org-agenda-mode                                               1           0.009630469   0.009630469
org-closest-date                                              371         0.0093104750  2.509...e-05
org-diary-sexp-entry                                          15          0.0080657960  0.0005377197
org-class                                                     14          0.007887857   0.0005634183
org-up-heading-safe                                           158         0.0075163960  4.757...e-05
org-agenda-format-item                                        89          0.0071282560  8.009...e-05
org-get-limited-outline-regexp                                1340        0.0058793909  4.387...e-06
org-agenda-highlight-todo                                     89          0.0057861589  6.501...e-05
org-get-priority                                              54          0.0053725899  9.949...e-05
org-parse-time-string                                         620         0.0052245240  8.426...e-06
org-at-property-p                                             38          0.005025087   0.0001322391
org-element-keyword-parser                                    189         0.0047338079  2.504...e-05
org-check-agenda-file                                         126         0.0040822989  3.239...e-05
org-habit-insert-consistency-graphs                           1           0.004003812   0.004003812
org-entries-lessp                                             449         0.0038918000  8.667...e-06
org-get-agenda-file-buffer                                    126         0.0033614579  2.667...e-05
org-time-string-to-time                                       219         0.0032869429  1.500...e-05
org-before-first-heading-p                                    414         0.0031319869  7.565...e-06
org-find-base-buffer-visiting                                 126         0.0028143069  2.233...e-05
org-outline-level                                             319         0.0027585700  8.647...e-06
org-refresh-property                                          36          0.00255745    7.104...e-05
org-entry-properties                                          60          0.0024294359  4.049...e-05
org-at-heading-p                                              504         0.0023393559  4.641...e-06
org-get-scheduled-time                                        30          0.0022798479  7.599...e-05
org-element--collect-affiliated-keywords                      189         0.0020675500  1.093...e-05
org-today                                                     347         0.0020669909  5.956...e-06
org-in-src-block-p                                            401         0.0019977300  4.981...e-06
org-add-props                                                 296         0.0019435820  6.566...e-06
org-split-string                                              389         0.0017634860  4.533...e-06
org-activate-links                                            8           0.001642042   0.0002052552
org-habit-build-graph                                         30          0.0015790539  5.263...e-05
org-agenda-new-marker                                         168         0.0015773760  9.389...e-06
org-agenda-today-p                                            127         0.0013905710  1.094...e-05
org-get-wdays                                                 363         0.0013644570  3.758...e-06
org-date-to-gregorian                                         128         0.0013468460  1.052...e-05
org-heading-components                                        32          0.00129957    4.061...e-05
org-agenda-skip-eval                                          802         0.0012735039  1.587...e-06
org-make-options-regexp                                       63          0.0012279850  1.949...e-05
org-tag-alist-to-groups                                       63          0.0010374070  1.646...e-05
org-remove-uninherited-tags                                   94          0.0009648460  1.026...e-05
org-replace-escapes                                           30          0.0007880249  2.626...e-05
org-not-nil                                                   452         0.000707637   1.565...e-06
org-delete-all                                                94          0.0006121149  6.511...e-06
org-get-time-of-day                                           58          0.000600308   1.035...e-05
org-agenda-add-time-grid-maybe                                1           0.000572651   0.000572651
org-plist-delete                                              77          0.0005467429  7.100...e-06
org-add-prop-inherited                                        297         0.0005159510  1.737...e-06
org-at-date-range-p                                           76          0.0004887810  6.431...e-06
org-habit-get-faces                                           240         0.0004442300  1.850...e-06
org-get-todo-face                                             77          0.0004291360  5.573...e-06
org-get-category                                              84          0.0003947150  4.698...e-06
org-get-repeat                                                30          0.0003634969  1.211...e-05
org-element-property                                          210         0.0003313679  1.577...e-06
org-habit-get-priority                                        30          0.000323059   1.076...e-05
org-string-nw-p                                               63          0.0003027400  4.805...e-06
org-element--cache-put                                        189         0.0002822729  1.493...e-06
org-habit-duration-to-days                                    37          0.0002284319  6.173...e-06
org-end-of-subtree                                            3           0.00021202    7.067...e-05
org-property-inherit-p                                        126         0.0001995249  1.583...e-06
org-element-type                                              126         0.0001926009  1.528...e-06
org-element-link-parser                                       7           0.000181431   2.591...e-05
org-reduced-level                                             116         0.0001813659  1.563...e-06
org-agenda-get-category-icon                                  89          0.0001603440  1.801...e-06
org-agenda-fix-displayed-tags                                 89          0.0001597080  1.794...e-06
org-file-menu-entry                                           63          0.0001564899  2.483...e-06
org-in-commented-heading-p                                    2           0.000131152   6.5576e-05
org-downcase-keep-props                                       48          0.000127098   2.647875e-06
org-agenda-reset-markers                                      1           0.000115368   0.000115368
org-face-from-face-or-color                                   77          0.0001138300  1.478...e-06
org-link-get-parameter                                        49          9.748...e-05  1.989...e-06
org-agenda-deadline-face                                      30          8.107...e-05  2.702...e-06
org-agenda-fontify-priorities                                 1           7.0883e-05    7.0883e-05
org-days-to-iso-week                                          3           4.1622e-05    1.387...e-05
org-link-expand-abbrev                                        7           4.001...e-05  5.716...e-06
org-agenda-fit-window-to-buffer                               1           3.7851e-05    3.7851e-05
org-compile-prefix-format                                     1           3.7431e-05    3.7431e-05
org-agenda-format-date-aligned                                1           3.0728e-05    3.0728e-05
org-agenda-span-name                                          6           2.7864e-05    4.644e-06
org-agenda-time-of-day-to-ampm-maybe                          15          2.6886e-05    1.7924e-06
org-agenda-get-day-face                                       1           1.6551e-05    1.6551e-05
org-agenda-prepare-window                                     1           1.3968e-05    1.3968e-05
org-remove-flyspell-overlays-in                               7           1.200...e-05  1.715...e-06
org-unhighlight                                               2           1.0335e-05    5.1675e-06
org-agenda-mark-header-line                                   1           8.45e-06      8.45e-06
org-agenda-update-agenda-type                                 2           7.752e-06     3.876e-06
org-agenda-set-mode-name                                      1           5.796e-06     5.796e-06
org-fit-window-to-buffer                                      1           5.378e-06     5.378e-06
org-agenda-ndays-to-span                                      2           3.422e-06     1.711e-06
org-agenda-use-sticky-p                                       1           3.212e-06     3.212e-06
org-set-sorting-strategy                                      1           2.165e-06     2.165e-06
org-time-stamp-format                                         1           2.165e-06     2.165e-06
org-font-lock-add-tag-faces                                   1           1.955e-06     1.955e-06
org-agenda-mark-clocking-task                                 1           1.885e-06     1.885e-06
org-agenda-span-to-ndays                                      1           1.816e-06     1.816e-06

[-- Attachment #5: org-agenda-wip-org-agenda-list-redo-no-change.txt --]
[-- Type: text/plain, Size: 13148 bytes --]

org-agenda-redo                                               1           1.178702222   1.178702222
org-let                                                       1           1.178247265   1.178247265
org-agenda-list                                               1           1.178229731   1.178229731
org-agenda-prepare                                            1           0.48068537    0.48068537
org-agenda-prepare-buffers                                    1           0.472847412   0.472847412
org-agenda--all-filtered-data                                 1           0.43565152    0.43565152
org-agenda--file-data                                         63          0.4075717370  0.0064693926
org-agenda-day-entries                                        53          0.2137552529  0.0040331179
org-set-regexps-and-options                                   63          0.1541392199  0.0024466542
org--setup-collect-keywords                                   63          0.1500767280  0.0023821702
org-agenda--entry-from-scheduled                              251         0.138514145   0.0005518491
org-element-at-point                                          126         0.1178067320  0.0009349740
org-element--parse-to                                         126         0.114328002   0.0009073650
org-element--current-element                                  189         0.1092768809  0.0005781845
org-refresh-category-properties                               63          0.103559748   0.0016438055
org-agenda-format-item                                        89          0.101851141   0.0011443948
org-refresh-properties                                        126         0.0919681909  0.0007299062
org-refresh-effort-properties                                 63          0.0531011259  0.0008428750
org-get-agenda-file-buffer                                    242         0.0471399489  0.0001947931
org-refresh-stats-properties                                  63          0.0467824180  0.0007425780
org-find-base-buffer-visiting                                 242         0.046212355   0.0001909601
org-entry-get                                                 378         0.034478209   9.121...e-05
org-is-habit-p                                                282         0.0277365440  9.835...e-05
org--property-local-values                                    318         0.0277205740  8.717...e-05
org-get-property-block                                        356         0.0272423039  7.652...e-05
org-agenda-finalize                                           1           0.023543801   0.023543801
org-habit-parse-todo                                          30          0.01924452    0.000641484
org-get-tags-at                                               168         0.0139295079  8.291...e-05
org-agenda-finalize-entries                                   1           0.01272397    0.01272397
org-agenda--timestamp-to-absolute                             400         0.0108944930  2.723...e-05
org-agenda--entry-from-deadline                               112         0.010626196   9.487...e-05
org-inlinetask-in-task-p                                      356         0.00992495    2.787...e-05
org-closest-date                                              371         0.0087987510  2.371...e-05
org-agenda-files                                              3           0.008135117   0.0027117056
org-diary-sexp-entry                                          15          0.007926009   0.0005284005
org-up-heading-safe                                           158         0.0077988760  4.935...e-05
org-class                                                     14          0.007770163   0.0005550116
org-agenda-skip                                               653         0.0070349830  1.077...e-05
org-get-priority                                              54          0.0067794980  0.0001255462
org-agenda-highlight-todo                                     89          0.0056720390  6.373...e-05
org-parse-time-string                                         621         0.0050958050  8.205...e-06
org-back-to-heading                                           845         0.0050664990  5.995...e-06
org-at-property-p                                             38          0.004953412   0.0001303529
org-today                                                     819         0.0047186680  5.761...e-06
org-element-keyword-parser                                    189         0.0046536700  2.462...e-05
org-agenda-today-p                                            417         0.0046523200  1.115...e-05
org-habit-insert-consistency-graphs                           1           0.004317581   0.004317581
org-check-agenda-file                                         126         0.004211845   3.342...e-05
org-before-first-heading-p                                    394         0.0041592219  1.055...e-05
org-entries-lessp                                             449         0.0041116580  9.157...e-06
org-get-limited-outline-regexp                                922         0.0039637910  4.299...e-06
org-agenda-align-tags                                         1           0.003481992   0.003481992
org-agenda-mode                                               1           0.00317039    0.00317039
org-agenda-skip-eval                                          1306        0.0029743120  2.277...e-06
org-time-string-to-time                                       191         0.0028352819  1.484...e-05
org-refresh-property                                          36          0.002519841   6.999...e-05
org-agenda--get-tags                                          84          0.0024890940  2.963...e-05
org-at-heading-p                                              504         0.002300702   4.564...e-06
org-get-scheduled-time                                        30          0.002253266   7.510...e-05
org-entry-properties                                          60          0.0022028990  3.671...e-05
org-outline-level                                             235         0.0020635449  8.781...e-06
org-element--collect-affiliated-keywords                      189         0.0020160639  1.066...e-05
org-add-props                                                 296         0.0019430629  6.564...e-06
org-split-string                                              389         0.0017794609  4.574...e-06
org-activate-links                                            8           0.0017177009  0.0002147126
org-habit-build-graph                                         30          0.001614878   5.382...e-05
org-get-wdays                                                 363         0.0013186899  3.632...e-06
org-date-to-gregorian                                         128         0.0012819539  1.001...e-05
org-inlinetask-outline-regexp                                 356         0.0011518160  3.235...e-06
org-make-options-regexp                                       63          0.0011341469  1.800...e-05
org-heading-components                                        32          0.0011145149  3.482...e-05
org-tag-alist-to-groups                                       63          0.0010222419  1.622...e-05
org-remove-uninherited-tags                                   94          0.0009789989  1.041...e-05
org-replace-escapes                                           30          0.0007812429  2.604...e-05
org-not-nil                                                   452         0.0006990170  1.546...e-06
org-agenda-new-marker                                         168         0.0006616560  3.938...e-06
org-get-time-of-day                                           58          0.000633153   1.091...e-05
org-delete-all                                                94          0.0006058470  6.445...e-06
org-agenda-add-time-grid-maybe                                1           0.000566653   0.000566653
org-plist-delete                                              77          0.0005451290  7.079...e-06
org-add-prop-inherited                                        297         0.0005102800  1.718...e-06
org-habit-get-faces                                           240         0.0004648900  1.937...e-06
org-get-todo-face                                             77          0.000437913   5.687...e-06
org-base-buffer                                               242         0.0004379030  1.809...e-06
org-get-repeat                                                30          0.0003989319  1.329...e-05
org-element-property                                          210         0.0003276120  1.560...e-06
org-get-category                                              84          0.0003255159  3.875...e-06
org-habit-get-priority                                        30          0.0003218820  1.072...e-05
org-agenda--entry-from-timestamp                              272         0.000317624   1.167...e-06
org-string-nw-p                                               63          0.0003006519  4.772...e-06
org-element--cache-put                                        189         0.0002804659  1.483...e-06
org-habit-duration-to-days                                    37          0.0002280020  6.162...e-06
org-end-of-subtree                                            3           0.000206209   6.873...e-05
org-element-link-parser                                       7           0.0001943320  2.776...e-05
org-property-inherit-p                                        126         0.0001885340  1.496...e-06
org-element-type                                              126         0.0001884699  1.495...e-06
org-reduced-level                                             116         0.0001784690  1.538...e-06
org-agenda-get-category-icon                                  89          0.0001595460  1.792...e-06
org-agenda-fix-displayed-tags                                 89          0.0001547960  1.739...e-06
org-in-commented-heading-p                                    2           0.000130417   6.52085e-05
org-downcase-keep-props                                       48          0.0001258049  2.620...e-06
org-face-from-face-or-color                                   77          0.0001149120  1.492...e-06
org-agenda-reset-markers                                      1           0.000114002   0.000114002
org-file-menu-entry                                           63          0.0001026170  1.628...e-06
org-link-get-parameter                                        49          9.409...e-05  1.920...e-06
org-agenda-deadline-face                                      30          7.830...e-05  2.610...e-06
org-agenda-fontify-priorities                                 1           6.2868e-05    6.2868e-05
org-link-expand-abbrev                                        7           3.974...e-05  5.678...e-06
org-days-to-iso-week                                          3           3.9256e-05    1.308...e-05
org-agenda-fit-window-to-buffer                               1           3.856e-05     3.856e-05
org-compile-prefix-format                                     1           3.7022e-05    3.7022e-05
org-agenda-span-name                                          7           3.576...e-05  5.109...e-06
org-agenda-format-date-aligned                                1           3.0736e-05    3.0736e-05
org-agenda-time-of-day-to-ampm-maybe                          15          2.535...e-05  1.690...e-06
org-agenda-get-day-face                                       1           1.6764e-05    1.6764e-05
org-remove-flyspell-overlays-in                               7           1.1595e-05    1.656...e-06
org-agenda-update-agenda-type                                 2           1.0548e-05    5.274e-06
org-agenda-mark-header-line                                   1           8.662e-06     8.662e-06
org-agenda-prepare-window                                     1           6.077e-06     6.077e-06
org-fit-window-to-buffer                                      1           5.728e-06     5.728e-06
org-unhighlight                                               2           5.308...e-06  2.654...e-06
org-agenda-set-mode-name                                      1           5.029e-06     5.029e-06
org-agenda-ndays-to-span                                      2           3.353e-06     1.6765e-06
org-set-sorting-strategy                                      1           2.514e-06     2.514e-06
org-agenda-span-to-ndays                                      1           2.095e-06     2.095e-06
org-time-stamp-format                                         1           1.956e-06     1.956e-06
org-agenda-use-sticky-p                                       1           1.955e-06     1.955e-06
org-font-lock-add-tag-faces                                   1           1.816e-06     1.816e-06
org-agenda-mark-clocking-task                                 1           1.746e-06     1.746e-06
org-agenda--entry-from-diary                                  4           0.0           0.0
org-agenda--entry-from-range                                  14          0.0           0.0

[-- Attachment #6: org-agenda-master-org-agenda-list-redo-single-change.txt --]
[-- Type: text/plain, Size: 13266 bytes --]

org-agenda-redo                                               1           0.979580617   0.979580617
org-let                                                       1           0.975708007   0.975708007
org-agenda-list                                               1           0.975685381   0.975685381
org-agenda-prepare                                            1           0.457307205   0.457307205
org-agenda-prepare-buffers                                    1           0.449627696   0.449627696
org-agenda-get-day-entries                                    63          0.387256161   0.0061469231
org-agenda-get-scheduled                                      63          0.2863316860  0.0045449473
org-refresh-properties                                        126         0.1718999169  0.0013642850
org-refresh-effort-properties                                 63          0.1332340789  0.0021148266
org-at-planning-p                                             439         0.1111634050  0.0002532196
org-inlinetask-in-task-p                                      775         0.1102864369  0.0001423050
org-refresh-category-properties                               63          0.1024042890  0.0016254649
org-agenda-finalize-entries                                   1           0.093375136   0.093375136
org-agenda-skip                                               401         0.0892891210  0.0002226661
org-agenda-highlight-todo                                     88          0.0868348560  0.0009867597
org-agenda-skip-eval                                          802         0.0809003630  0.0001008732
org-set-regexps-and-options                                   63          0.0605052399  0.0009604006
org--setup-collect-keywords                                   63          0.0563042019  0.0008937174
org-refresh-stats-properties                                  63          0.0474978360  0.0007539339
org-agenda-get-deadlines                                      63          0.042146885   0.0006689981
org-entry-get                                                 378         0.0410961609  0.0001087200
org--property-local-values                                    318         0.034021408   0.0001069855
org-is-habit-p                                                282         0.0339244829  0.0001202995
org-get-property-block                                        356         0.0333441590  9.366...e-05
org-agenda-get-timestamps                                     63          0.0278531979  0.0004421142
org-element-at-point                                          126         0.0239630679  0.0001901830
org-agenda-finalize                                           1           0.023344395   0.023344395
org-element--parse-to                                         126         0.0204646350  0.0001624177
org-habit-parse-todo                                          30          0.018928398   0.0006309466
org-back-to-heading                                           1644        0.0169215689  1.029...e-05
org-element--current-element                                  189         0.0153363200  8.114...e-05
org-get-tags-at                                               166         0.0139454890  8.400...e-05
org-agenda--timestamp-to-absolute                             371         0.0129861830  3.500...e-05
org-agenda-get-blocks                                         63          0.012673662   0.0002011692
org-agenda-get-sexps                                          63          0.012501031   0.0001984290
org-time-string-to-absolute                                   371         0.0113255720  3.052...e-05
org-get-todo-state                                            383         0.0112204760  2.929...e-05
org-closest-date                                              371         0.0093748880  2.526...e-05
org-agenda-files                                              3           0.008193143   0.0027310476
org-diary-sexp-entry                                          15          0.007987268   0.0005324845
org-class                                                     14          0.007817776   0.0005584125
org-up-heading-safe                                           157         0.007581667   4.829...e-05
org-agenda-format-item                                        88          0.0069797660  7.931...e-05
org-get-limited-outline-regexp                                1340        0.0058439850  4.361...e-06
org-get-priority                                              53          0.0053243349  0.0001004591
org-parse-time-string                                         620         0.0051984339  8.384...e-06
org-at-property-p                                             38          0.005094515   0.0001340661
org-element-keyword-parser                                    189         0.004710558   2.492...e-05
org-habit-insert-consistency-graphs                           1           0.004382612   0.004382612
org-check-agenda-file                                         126         0.0040800850  3.238...e-05
org-entries-lessp                                             438         0.0039256779  8.962...e-06
org-agenda-align-tags                                         1           0.003385514   0.003385514
org-get-agenda-file-buffer                                    126         0.0033153969  2.631...e-05
org-time-string-to-time                                       219         0.0032530330  1.485...e-05
org-agenda-mode                                               1           0.003165117   0.003165117
org-before-first-heading-p                                    414         0.0031284529  7.556...e-06
org-outline-level                                             317         0.0027953360  8.818...e-06
org-find-base-buffer-visiting                                 126         0.0027688059  2.197...e-05
org-refresh-property                                          36          0.002591983   7.199...e-05
org-inlinetask-outline-regexp                                 775         0.0024954660  3.219...e-06
org-entry-properties                                          60          0.0024171890  4.028...e-05
org-at-heading-p                                              504         0.0023481799  4.659...e-06
org-get-scheduled-time                                        30          0.002299027   7.663...e-05
org-element--collect-affiliated-keywords                      189         0.0020583869  1.089...e-05
org-today                                                     347         0.0020381960  5.873...e-06
org-in-src-block-p                                            401         0.0020133930  5.020...e-06
org-add-props                                                 292         0.0018792490  6.435...e-06
org-split-string                                              387         0.0017587850  4.544...e-06
org-habit-build-graph                                         30          0.0016512389  5.504...e-05
org-activate-links                                            8           0.001635667   0.0002044583
org-agenda-new-marker                                         166         0.0015395710  9.274...e-06
org-get-wdays                                                 363         0.0013892820  3.827...e-06
org-agenda-today-p                                            127         0.001385663   1.091...e-05
org-date-to-gregorian                                         128         0.001345918   1.051...e-05
org-heading-components                                        32          0.0013064680  4.082...e-05
org-make-options-regexp                                       63          0.001203606   1.910...e-05
org-tag-alist-to-groups                                       63          0.001023495   1.624...e-05
org-remove-uninherited-tags                                   93          0.0010097409  1.085...e-05
org-replace-escapes                                           30          0.0007847300  2.615...e-05
org-not-nil                                                   452         0.0007008699  1.550...e-06
org-delete-all                                                93          0.0006070700  6.527...e-06
org-plist-delete                                              76          0.0005889059  7.748...e-06
org-get-time-of-day                                           57          0.0005865380  1.029...e-05
org-agenda-add-time-grid-maybe                                1           0.000584167   0.000584167
org-add-prop-inherited                                        297         0.0005224350  1.759...e-06
org-at-date-range-p                                           76          0.0004618140  6.076...e-06
org-habit-get-faces                                           240         0.0004561590  1.900...e-06
org-get-todo-face                                             76          0.0004381340  5.764...e-06
org-get-category                                              83          0.000365235   4.400...e-06
org-get-repeat                                                30          0.000360765   1.202...e-05
org-element-property                                          210         0.000332273   1.582...e-06
org-habit-get-priority                                        30          0.000318166   1.060...e-05
org-string-nw-p                                               63          0.000297422   4.720...e-06
org-element--cache-put                                        189         0.0002901509  1.535...e-06
org-habit-duration-to-days                                    37          0.000227169   6.139...e-06
org-end-of-subtree                                            3           0.0002133449  7.1115e-05
org-property-inherit-p                                        126         0.0001981179  1.572...e-06
org-element-type                                              126         0.0001909949  1.515...e-06
org-element-link-parser                                       7           0.0001876440  2.680...e-05
org-reduced-level                                             115         0.0001862509  1.619...e-06
org-agenda-get-category-icon                                  88          0.0001575510  1.790...e-06
org-agenda-fix-displayed-tags                                 88          0.0001540550  1.750...e-06
org-in-commented-heading-p                                    2           0.0001354090  6.770...e-05
org-downcase-keep-props                                       47          0.000124026   2.638...e-06
org-face-from-face-or-color                                   76          0.0001137600  1.496...e-06
org-file-menu-entry                                           63          9.930...e-05  1.576...e-06
org-link-get-parameter                                        49          9.790...e-05  1.998...e-06
org-agenda-deadline-face                                      30          8.045...e-05  2.681...e-06
org-agenda-reset-markers                                      1           6.7112e-05    6.7112e-05
org-agenda-fontify-priorities                                 1           6.1804e-05    6.1804e-05
org-agenda-fit-window-to-buffer                               1           4.3926e-05    4.3926e-05
org-agenda-span-name                                          9           4.1971e-05    4.663...e-06
org-days-to-iso-week                                          3           4.1341e-05    1.378...e-05
org-link-expand-abbrev                                        7           3.889...e-05  5.556...e-06
org-compile-prefix-format                                     1           3.7362e-05    3.7362e-05
org-agenda-format-date-aligned                                1           3.2124e-05    3.2124e-05
org-agenda-time-of-day-to-ampm-maybe                          15          2.5978e-05    1.731...e-06
org-agenda-get-day-face                                       1           1.69e-05      1.69e-05
org-remove-flyspell-overlays-in                               7           1.1874e-05    1.696...e-06
org-agenda-update-agenda-type                                 2           1.0406e-05    5.203e-06
org-agenda-mark-header-line                                   1           8.589e-06     8.589e-06
org-agenda-prepare-window                                     1           6.146e-06     6.146e-06
org-unhighlight                                               2           6.076e-06     3.038e-06
org-fit-window-to-buffer                                      1           5.797e-06     5.797e-06
org-agenda-set-mode-name                                      1           5.447e-06     5.447e-06
org-agenda-ndays-to-span                                      2           3.422e-06     1.711e-06
org-set-sorting-strategy                                      1           2.234e-06     2.234e-06
org-font-lock-add-tag-faces                                   1           1.956e-06     1.956e-06
org-time-stamp-format                                         1           1.956e-06     1.956e-06
org-agenda-span-to-ndays                                      1           1.885e-06     1.885e-06
org-agenda-mark-clocking-task                                 1           1.816e-06     1.816e-06
org-agenda-use-sticky-p                                       1           1.187e-06     1.187e-06

[-- Attachment #7: org-agenda-wip-org-agenda-list-redo-single-change.txt --]
[-- Type: text/plain, Size: 14244 bytes --]

org-agenda-redo                                               1           1.189759099   1.189759099
org-let                                                       1           1.186644775   1.186644775
org-agenda-list                                               1           1.186628361   1.186628361
org-agenda-prepare                                            1           0.390363914   0.390363914
org-agenda-prepare-buffers                                    1           0.376206727   0.376206727
org-agenda--all-filtered-data                                 1           0.345797162   0.345797162
org-agenda--file-data                                         63          0.3177460420  0.0050435879
org-agenda-day-entries                                        53          0.2136968060  0.0040320152
org-agenda-files                                              3           0.107505378   0.035835126
org-refresh-category-properties                               63          0.1018996590  0.0016174549
org-refresh-properties                                        126         0.0919485139  0.0007297501
org-set-regexps-and-options                                   63          0.0595033569  0.0009444977
org--setup-collect-keywords                                   63          0.0555036010  0.0008810095
org-refresh-effort-properties                                 63          0.052928889   0.0008401410
org-refresh-stats-properties                                  63          0.046687102   0.0007410651
org-get-agenda-file-buffer                                    242         0.0464441749  0.0001919180
org-find-base-buffer-visiting                                 242         0.0455364609  0.0001881671
org-agenda--entry-from-scheduled                              251         0.043760769   0.0001743456
org-entry-get                                                 380         0.0345997310  9.105...e-05
org--property-local-values                                    320         0.0278089590  8.690...e-05
org-is-habit-p                                                282         0.0274940110  9.749...e-05
org-get-property-block                                        358         0.0272487230  7.611...e-05
org-element-at-point                                          128         0.0239301190  0.0001869540
org-agenda-finalize                                           1           0.02272703    0.02272703
org-element--parse-to                                         128         0.0203970680  0.0001593520
org-habit-parse-todo                                          30          0.018963755   0.0006321251
org-element--current-element                                  191         0.015116539   7.914...e-05
org-get-tags-at                                               168         0.0132969780  7.914...e-05
org-agenda-finalize-entries                                   1           0.012609831   0.012609831
org-agenda--timestamp-to-absolute                             400         0.0107326389  2.683...e-05
org-agenda--entry-from-deadline                               112         0.0105568989  9.425...e-05
org-inlinetask-in-task-p                                      368         0.0103523370  2.813...e-05
org-closest-date                                              371         0.0086701749  2.336...e-05
org-diary-sexp-entry                                          15          0.008346092   0.0005564061
org-class                                                     14          0.0081869840  0.0005847845
org-up-heading-safe                                           160         0.0075611499  4.725...e-05
org-agenda-format-item                                        89          0.0074729520  8.396...e-05
org-agenda-mode                                               1           0.007285929   0.007285929
org-agenda-skip                                               653         0.0069884379  1.070...e-05
org-get-priority                                              54          0.0067334360  0.0001246932
org-agenda-highlight-todo                                     89          0.0059563930  6.692...e-05
org-back-to-heading                                           859         0.0051085290  5.947...e-06
org-parse-time-string                                         623         0.0050678369  8.134...e-06
org-at-property-p                                             38          0.0048803710  0.0001284308
org-today                                                     819         0.0046834639  5.718...e-06
org-element-keyword-parser                                    189         0.0046204729  2.444...e-05
org-agenda-today-p                                            417         0.0046015510  1.103...e-05
org-check-agenda-file                                         126         0.0044703089  3.547...e-05
org-before-first-heading-p                                    396         0.0041543939  1.049...e-05
org-get-limited-outline-regexp                                942         0.0040269230  4.274...e-06
org-habit-insert-consistency-graphs                           1           0.003976909   0.003976909
org-entries-lessp                                             449         0.0039481889  8.793...e-06
org-agenda-align-tags                                         1           0.003577046   0.003577046
org-agenda-skip-eval                                          1306        0.0029626830  2.268...e-06
org-time-string-to-time                                       191         0.0028686140  1.501...e-05
org-refresh-property                                          36          0.002543208   7.064...e-05
org-agenda--get-tags                                          84          0.0024508039  2.917...e-05
org-at-heading-p                                              510         0.0023383300  4.584...e-06
org-entry-properties                                          60          0.002165828   3.609...e-05
org-get-scheduled-time                                        30          0.002156125   7.187...e-05
org-outline-level                                             237         0.002029904   8.564...e-06
org-element--collect-affiliated-keywords                      189         0.0019907239  1.053...e-05
org-add-props                                                 296         0.0019194109  6.484...e-06
org-activate-links                                            8           0.0018472620  0.0002309077
org-split-string                                              389         0.0017198549  4.421...e-06
org-agenda--planning-data                                     1           0.001689417   0.001689417
org-habit-build-graph                                         30          0.0015148699  5.049...e-05
org-get-wdays                                                 363         0.0013118969  3.614...e-06
org-date-to-gregorian                                         128         0.0012841750  1.003...e-05
org-inlinetask-outline-regexp                                 368         0.0011828389  3.214...e-06
org-heading-components                                        32          0.001131769   3.536...e-05
org-agenda--timestamp-data                                    1           0.001094056   0.001094056
org-make-options-regexp                                       63          0.001080996   1.715...e-05
org-mode-flyspell-verify                                      2           0.001058023   0.0005290115
org-tag-alist-to-groups                                       63          0.001031402   1.637...e-05
org-remove-uninherited-tags                                   94          0.0009436010  1.003...e-05
org-replace-escapes                                           30          0.000759982   2.533...e-05
org-at-planning-p                                             10          0.000757402   7.57402e-05
org-not-nil                                                   452         0.0006996999  1.548...e-06
org-agenda-new-marker                                         168         0.0006531900  3.888...e-06
org-get-time-of-day                                           59          0.0006432750  1.090...e-05
org-delete-all                                                94          0.0005940289  6.319...e-06
org-plist-delete                                              77          0.000571886   7.427...e-06
org-agenda-add-time-grid-maybe                                1           0.000541928   0.000541928
org-add-prop-inherited                                        297         0.0005079210  1.710...e-06
org-base-buffer                                               242         0.0004461700  1.843...e-06
org-get-todo-face                                             77          0.0004416270  5.735...e-06
org-habit-get-faces                                           240         0.0004261950  1.775...e-06
org-log-into-drawer                                           2           0.000398539   0.0001992695
org-get-repeat                                                30          0.0003963699  1.321...e-05
org-entry-get-with-inheritance                                2           0.00036662    0.00018331
org-agenda-reset-markers                                      1           0.00034336    0.00034336
org-habit-get-priority                                        30          0.000334069   1.113...e-05
org-element-property                                          212         0.0003255530  1.535...e-06
org-get-category                                              84          0.0003201669  3.811...e-06
org-agenda--entry-from-timestamp                              272         0.000318774   1.171...e-06
org-element--cache-put                                        191         0.0003017949  1.580...e-06
org-string-nw-p                                               63          0.0002932099  4.654...e-06
org-agenda--diary-data                                        1           0.00026178    0.00026178
org-habit-duration-to-days                                    37          0.0002279049  6.159...e-06
org-end-of-subtree                                            3           0.000215543   7.184...e-05
org-element-link-parser                                       7           0.000200386   2.862...e-05
org-element-type                                              128         0.0001966169  1.536...e-06
org-property-inherit-p                                        126         0.0001866259  1.481...e-06
org-reduced-level                                             116         0.0001810390  1.560...e-06
org-agenda-get-category-icon                                  89          0.0001600130  1.797...e-06
org-element-planning-parser                                   2           0.000159598   7.9799e-05
org-agenda-fix-displayed-tags                                 89          0.0001551940  1.743...e-06
org-in-commented-heading-p                                    2           0.0001495390  7.476...e-05
org-downcase-keep-props                                       48          0.000125097   2.606...e-06
org-face-from-face-or-color                                   77          0.0001155920  1.501...e-06
org-element-timestamp-parser                                  2           0.0001037900  5.189...e-05
org-link-get-parameter                                        49          9.7571e-05    1.991...e-06
org-file-menu-entry                                           63          9.443...e-05  1.498...e-06
org-agenda-deadline-face                                      30          7.752...e-05  2.584...e-06
org-agenda-fontify-priorities                                 1           6.3628e-05    6.3628e-05
org-days-to-iso-week                                          3           4.4352e-05    1.4784e-05
org-link-expand-abbrev                                        7           4.0231e-05    5.747...e-06
org-agenda-fit-window-to-buffer                               1           3.9043e-05    3.9043e-05
org-compile-prefix-format                                     1           3.6179e-05    3.6179e-05
org-agenda-format-date-aligned                                1           2.9964e-05    2.9964e-05
org-agenda-span-name                                          6           2.6052e-05    4.342e-06
org-agenda-time-of-day-to-ampm-maybe                          15          2.5634e-05    1.708...e-06
org-agenda-get-day-face                                       1           1.6413e-05    1.6413e-05
org-agenda-mark-header-line                                   1           1.5994e-05    1.5994e-05
org-set-sorting-strategy                                      1           1.355e-05     1.355e-05
org-remove-flyspell-overlays-in                               7           1.2921e-05    1.845...e-06
org-agenda-prepare-window                                     1           1.1804e-05    1.1804e-05
org-unhighlight                                               2           1.068...e-05  5.342...e-06
org--property-global-value                                    2           6.984e-06     3.492e-06
org-agenda-update-agenda-type                                 2           6.357e-06     3.1785e-06
org-fit-window-to-buffer                                      1           5.657e-06     5.657e-06
org-agenda-set-mode-name                                      1           5.029e-06     5.029e-06
org-element-lineage                                           2           4.4e-06       2.2e-06
org-agenda-ndays-to-span                                      2           3.911e-06     1.9555e-06
org-agenda-use-sticky-p                                       1           3.143e-06     3.143e-06
org-agenda-span-to-ndays                                      1           2.235e-06     2.235e-06
org-font-lock-add-tag-faces                                   1           1.886e-06     1.886e-06
org-time-stamp-format                                         1           1.885e-06     1.885e-06
org-agenda-mark-clocking-task                                 1           1.816e-06     1.816e-06
org-agenda--entry-from-diary                                  4           0.0           0.0
org-agenda--entry-from-range                                  14          0.0           0.0

[-- Attachment #8: org-custom-command-projects-master.txt --]
[-- Type: text/plain, Size: 14756 bytes --]

org-agenda-redo                                               1           2.14623279    2.14623279
org-agenda-run-series                                         1           2.145760043   2.145760043
org-let2                                                      3           1.708625605   0.5695418683
org-agenda-list-stuck-projects                                1           1.288049253   1.288049253
org-tags-view                                                 1           1.287988763   1.287988763
org-scan-tags                                                 63          1.2770619449  0.0202708245
org-let                                                       2           0.434409858   0.217204929
org-agenda-prepare                                            4           0.4044577889  0.1011144472
org-agenda-prepare-buffers                                    1           0.39696103    0.39696103
org-agenda-entry-get-agenda-timestamp                         5128        0.3555775899  6.934...e-05
org-agenda-get-day-entries                                    126         0.3482630980  0.0027639928
org-todo-list                                                 1           0.31461561    0.31461561
org-agenda-get-todos                                          63          0.2767064820  0.0043921663
org-agenda-new-marker                                         228         0.2363831870  0.0010367683
org-refresh-category-properties                               63          0.1100058159  0.0017461240
org-agenda-list                                               1           0.105922394   0.105922394
org-refresh-properties                                        126         0.0950595240  0.0007544406
org-set-regexps-and-options                                   63          0.0757857270  0.0012029480
org--setup-collect-keywords                                   63          0.0645465259  0.0010245480
org-outline-level                                             5683        0.0635320640  1.117...e-05
org-agenda-get-deadlines                                      63          0.061456909   0.0009755064
org-agenda-finalize-entries                                   3           0.061199581   0.0203998603
org-em                                                        33965       0.0566475210  1.667...e-06
org-refresh-effort-properties                                 63          0.0558289939  0.0008861745
org-entries-lessp                                             555         0.0474363469  8.547...e-05
org-refresh-stats-properties                                  63          0.0469523460  0.0007452753
org-element-at-point                                          126         0.0367303069  0.0002915103
org-element--parse-to                                         126         0.0320469190  0.0002543406
org-add-prop-inherited                                        16607       0.0310962070  1.872...e-06
org-agenda-finalize                                           4           0.03000732    0.00750183
org-remove-uninherited-tags                                   1302        0.0267108689  2.051...e-05
org-get-tags-at                                               298         0.0259019460  8.691...e-05
org-get-category                                              5202        0.0246822289  4.744...e-06
org-delete-all                                                1302        0.0206119719  1.583...e-05
org-element--current-element                                  189         0.0196486270  0.0001039609
org-get-priority                                              154         0.0148099329  9.616...e-05
org-up-heading-safe                                           269         0.0133613719  4.967...e-05
org-split-string                                              1530        0.0128721739  8.413...e-06
org-agenda-format-item                                        154         0.0113239809  7.353...e-05
org-reduced-level                                             5204        0.0105263339  2.022...e-06
org-agenda-files                                              5           0.010265828   0.0020531656
org-agenda-highlight-todo                                     154         0.0101467279  6.588...e-05
org-at-planning-p                                             112         0.0091858620  8.201...e-05
org-back-to-heading                                           1112        0.0088793480  7.985...e-06
org-get-property-block                                        74          0.0088609380  0.0001197424
org-inlinetask-in-task-p                                      186         0.0079013950  4.248...e-05
org-tag-alist-to-groups                                       63          0.0077751079  0.0001234144
org-agenda-skip-eval                                          600         0.0077184670  1.286...e-05
org-check-agenda-file                                         252         0.0068460399  2.716...e-05
org-entry-get                                                 36          0.0064688400  0.0001796900
org-element-keyword-parser                                    189         0.0064632510  3.419...e-05
org-agenda-skip                                               300         0.0061084790  2.036...e-05
org-get-agenda-file-buffer                                    252         0.0059898730  2.376...e-05
org--property-local-values                                    36          0.005822095   0.0001617248
org-get-todo-state                                            212         0.0056970549  2.687...e-05
org-trim                                                      413         0.0055528910  1.344...e-05
org-at-property-p                                             38          0.005550025   0.0001460532
org-end-of-subtree                                            97          0.004919416   5.071...e-05
org-agenda--timestamp-to-absolute                             112         0.0047826499  4.270...e-05
org-find-base-buffer-visiting                                 252         0.0046488199  1.844...e-05
org-uniquify                                                  379         0.0045538099  1.201...e-05
org-get-limited-outline-regexp                                753         0.0044956559  5.970...e-06
org-time-string-to-absolute                                   112         0.004247657   3.792...e-05
org-closest-date                                              112         0.0034574369  3.086...e-05
org-element--collect-affiliated-keywords                      189         0.0033049039  1.748...e-05
org-refresh-property                                          36          0.0031929310  8.869...e-05
org-add-props                                                 430         0.0027892599  6.486...e-06
org-at-heading-p                                              504         0.0027609060  5.477...e-06
org-agenda-mode                                               1           0.002597175   0.002597175
org-plist-delete                                              107         0.0025370939  2.371...e-05
org-cmp-todo-state                                            220         0.0023408960  1.064...e-05
org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item  104         0.0018951789  1.822...e-05
org-agenda-align-tags                                         1           0.001862487   0.001862487
org-parse-time-string                                         118         0.0017580699  1.489...e-05
org-element-property                                          822         0.001682079   2.046...e-06
org-agenda-today-p                                            127         0.0016754180  1.319...e-05
org-activate-links                                            2           0.0016560090  0.0008280045
org-agenda-reset-markers                                      2           0.00157666    0.00078833
org-cmp-values                                                555         0.0015049199  2.711...e-06
org-in-src-block-p                                            216         0.0014827099  6.864...e-06
org-today                                                     192         0.0013615179  7.091...e-06
org-make-options-regexp                                       63          0.0012019790  1.907...e-05
org-re-property                                               261         0.001092883   4.187...e-06
org-cmp-effort                                                335         0.0010622760  3.170...e-06
org-element--cache-put                                        189         0.0010415979  5.511...e-06
org-before-first-heading-p                                    112         0.0010097559  9.015...e-06
org-cmp-time                                                  335         0.0009391359  2.803...e-06
org-cmp-habit-p                                               335         0.0008610970  2.570...e-06
org-get-wdays                                                 118         0.000826053   7.000...e-06
org-get-todo-face                                             108         0.0007564880  7.004...e-06
org-deadline-close-p                                          6           0.000743766   0.000123961
org-element--cache-active-p                                   441         0.0007304990  1.656...e-06
org-inlinetask-outline-regexp                                 186         0.0007049259  3.789...e-06
org-cmp-category                                              220         0.0006860689  3.118...e-06
org-element-type                                              315         0.0006324990  2.007...e-06
org-duration-to-minutes                                       36          0.0005254860  1.459...e-05
org-element-put-property                                      189         0.0005091289  2.693...e-06
org-get-time-of-day                                           72          0.0004893689  6.796...e-06
org-element-restriction                                       189         0.0003954880  2.092...e-06
org-time-stamp-to-now                                         6           0.0003655270  6.092...e-05
org-get-heading                                               10          0.000361613   3.61613e-05
org-string-nw-p                                               66          0.0003250889  4.925...e-06
org-agenda-get-category-icon                                  154         0.0003226470  2.095...e-06
org-agenda-fix-displayed-tags                                 154         0.0002861040  1.857...e-06
org-time-string-to-time                                       6           0.0002766769  4.611...e-05
org-property-inherit-p                                        126         0.0002663999  2.114...e-06
org-entry-is-done-p                                           6           0.0002504150  4.173...e-05
org-agenda-deadline-face                                      74          0.000224987   3.040...e-06
org-face-from-face-or-color                                   108         0.0002009620  1.860...e-06
org-downcase-keep-props                                       62          0.0001765080  2.846...e-06
org-compile-prefix-format                                     3           0.000169246   5.641...e-05
org-element--next-mode                                        63          0.0001534569  2.435...e-06
org-not-nil                                                   72          0.000153184   2.127...e-06
org-in-commented-heading-p                                    2           0.000151855   7.59275e-05
org-make-tags-matcher                                         1           0.000133553   0.000133553
org-file-menu-entry                                           63          0.0001237790  1.964...e-06
org-heading-components                                        2           0.000100165   5.00825e-05
org-agenda-fontify-priorities                                 1           9.3879e-05    9.3879e-05
org-date-to-gregorian                                         4           6.1818e-05    1.54545e-05
org-agenda-fit-window-to-buffer                               1           5.1061e-05    5.1061e-05
org-days-to-iso-week                                          3           5.0991e-05    1.6997e-05
org-element-link-parser                                       1           4.2678e-05    4.2678e-05
org-tags-expand                                               1           4.17e-05      4.17e-05
org-agenda-format-date-aligned                                1           3.9675e-05    3.9675e-05
org-agenda-mark-header-line                                   4           3.834...e-05  9.586...e-06
org-agenda-span-name                                          7           3.5204e-05    5.029...e-06
org-agenda-propertize-selected-todo-keywords                  1           3.0943e-05    3.0943e-05
org-link-get-parameter                                        6           1.9e-05       3.166...e-06
org-agenda-get-day-face                                       1           1.823e-05     1.823e-05
org-rear-nonsticky-at                                         1           1.5018e-05    1.5018e-05
org-agenda-update-agenda-type                                 2           1.3969e-05    6.9845e-06
org-agenda-prepare-window                                     1           1.0897e-05    1.0897e-05
org-current-line                                              2           1.0478e-05    5.239e-06
org-agenda-set-mode-name                                      1           9.989e-06     9.989e-06
org-set-sorting-strategy                                      3           9.22e-06      3.073...e-06
org-fit-window-to-buffer                                      1           8.172e-06     8.172e-06
org-agenda-use-sticky-p                                       4           7.124e-06     1.781e-06
org-unhighlight                                               2           5.728e-06     2.864e-06
org-last                                                      2           5.168e-06     2.584e-06
org-agenda-add-time-grid-maybe                                1           4.4e-06       4.4e-06
org-remove-flyspell-overlays-in                               1           4.191e-06     4.191e-06
org-get-at-bol                                                1           4.191e-06     4.191e-06
org-goto-line                                                 1           3.981e-06     3.981e-06
org-agenda-ndays-to-span                                      2           3.773e-06     1.8865e-06
org-font-lock-add-tag-faces                                   1           3.143e-06     3.143e-06
org-agenda-mark-clocking-task                                 1           2.375e-06     2.375e-06
org-agenda-span-to-ndays                                      1           2.305e-06     2.305e-06

[-- Attachment #9: org-custom-command-projects-wip.txt --]
[-- Type: text/plain, Size: 14968 bytes --]

org-agenda-redo                                               1           3.125571084   3.125571084
org-agenda-run-series                                         1           3.124895939   3.124895939
org-let2                                                      3           2.444346625   0.8147822083
org-agenda-list-stuck-projects                                1           1.062843444   1.062843444
org-tags-view                                                 1           1.062790843   1.062790843
org-scan-tags                                                 63          1.0434617790  0.0165628853
org-agenda--file-data                                         126         0.709296978   0.0056293410
org-todo-list                                                 1           0.704302554   0.704302554
org-let                                                       2           0.677798369   0.3388991845
org-agenda-list                                               1           0.677163254   0.677163254
org-agenda-prepare                                            4           0.64822992    0.16205748
org-agenda-prepare-buffers                                    1           0.637535301   0.637535301
org-agenda--all-filtered-data                                 1           0.370894683   0.370894683
org-agenda-entry-get-agenda-timestamp                         5128        0.354148794   6.906...e-05
org-agenda-day-entries                                        87          0.3516766969  0.0040422608
org-refresh-category-properties                               63          0.3407871170  0.0054093193
org-agenda-finalize-entries                                   3           0.293596582   0.0978655273
org-element-at-point                                          126         0.2678261660  0.0021256044
org-element--parse-to                                         126         0.2630835099  0.0020879643
org-agenda--entry-from-deadline                               112         0.2584373090  0.0023074759
org-element--current-element                                  189         0.2506877230  0.0013263900
org-agenda--timestamp-to-absolute                             112         0.2337013020  0.0020866187
org-closest-date                                              112         0.2332130239  0.0020822591
org-parse-time-string                                         118         0.2316412889  0.0019630617
org-refresh-properties                                        126         0.0951631580  0.0007552631
org-set-regexps-and-options                                   63          0.0756038380  0.0012000609
org-get-agenda-file-buffer                                    402         0.0670410960  0.0001667688
org-find-base-buffer-visiting                                 402         0.0653291609  0.0001625103
org--setup-collect-keywords                                   63          0.064459011   0.0010231589
org-outline-level                                             5539        0.0616495500  1.113...e-05
org-em                                                        34025       0.0569228380  1.672...e-06
org-refresh-effort-properties                                 63          0.0561642500  0.0008914960
org-entries-lessp                                             559         0.0476856039  8.530...e-05
org-refresh-stats-properties                                  63          0.047409704   0.0007525349
org-agenda--entry-from-todo                                   2220        0.0383158699  1.725...e-05
org-entry-get                                                 606         0.0318411339  5.254...e-05
org-add-prop-inherited                                        16607       0.0311532060  1.875...e-06
org-agenda-finalize                                           4           0.0296232149  0.0074058037
org-remove-uninherited-tags                                   1302        0.0267192090  2.052...e-05
org-get-category                                              5400        0.0259066919  4.797...e-06
org-get-tags-at                                               298         0.0251227730  8.430...e-05
org-delete-all                                                1302        0.0206336659  1.584...e-05
org-entry-properties                                          570         0.0200484150  3.517...e-05
org-get-priority                                              154         0.016011787   0.0001039726
org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item  104         0.0142496409  0.0001370157
org-up-heading-safe                                           269         0.0132412060  4.922...e-05
org-split-string                                              1467        0.0124088969  8.458...e-06
org-agenda-format-item                                        154         0.011175197   7.256...e-05
org-reduced-level                                             5204        0.0106009579  2.037...e-06
org-agenda-files                                              5           0.0101510050  0.002030201
org-agenda-highlight-todo                                     154         0.009807933   6.368...e-05
org-get-property-block                                        74          0.008892576   0.0001201699
org-back-to-heading                                           1364        0.0081184400  5.951...e-06
org-agenda-skip-eval                                          412         0.0077427620  1.879...e-05
org-tag-alist-to-groups                                       63          0.0077058160  0.0001223145
org-check-agenda-file                                         252         0.0072456000  2.875...e-05
org-element-keyword-parser                                    189         0.006471694   3.424...e-05
org--property-local-values                                    36          0.0057337460  0.0001592707
org-at-property-p                                             38          0.0056248379  0.0001480220
org-end-of-subtree                                            97          0.0050150030  5.170...e-05
org-trim                                                      343         0.0046555200  1.357...e-05
org-uniquify                                                  253         0.0041794100  1.651...e-05
org-inlinetask-in-task-p                                      74          0.0040232840  5.436...e-05
org-agenda--get-tags                                          144         0.004006368   2.7822e-05
org-get-limited-outline-regexp                                641         0.0038063089  5.938...e-06
org-element--collect-affiliated-keywords                      189         0.0033023130  1.747...e-05
org-refresh-property                                          36          0.0032143630  8.928...e-05
org-at-heading-p                                              504         0.0028000590  5.555...e-06
org-add-props                                                 430         0.0026733929  6.217...e-06
org-agenda-mode                                               1           0.002606141   0.002606141
org-agenda-today-p                                            200         0.0025425760  1.271...e-05
org-plist-delete                                              107         0.0024942170  2.331...e-05
org-cmp-todo-state                                            220         0.0024426759  1.110...e-05
org-today                                                     314         0.0021232349  6.761...e-06
org-agenda-skip                                               206         0.0020050289  9.733...e-06
org-element-property                                          822         0.0016798439  2.043...e-06
org-agenda-align-tags                                         1           0.001669454   0.001669454
org-activate-links                                            2           0.001631033   0.0008155165
org-cmp-values                                                559         0.0015156960  2.711...e-06
org-agenda-reset-markers                                      2           0.00133206    0.00066603
org-make-options-regexp                                       63          0.0011558200  1.834...e-05
org-agenda-new-marker                                         228         0.0011430390  5.013...e-06
org-re-property                                               261         0.0011046860  4.232...e-06
org-cmp-effort                                                339         0.0010784180  3.181...e-06
org-element--cache-put                                        189         0.0010475420  5.542...e-06
org-before-first-heading-p                                    112         0.0010187590  9.096...e-06
org-cmp-time                                                  339         0.0009702829  2.862...e-06
org-base-buffer                                               402         0.0008799780  2.189...e-06
org-cmp-habit-p                                               339         0.0008731130  2.575...e-06
org-get-todo-face                                             108         0.0007571499  7.010...e-06
org-element--cache-active-p                                   441         0.0007211800  1.635...e-06
org-cmp-category                                              220         0.0006677429  3.035...e-06
org-get-wdays                                                 118         0.0006509009  5.516...e-06
org-deadline-close-p                                          6           0.0006351179  0.0001058529
org-element-type                                              315         0.0006344900  2.014...e-06
org-duration-to-minutes                                       36          0.000571621   1.587...e-05
org-get-time-of-day                                           72          0.0005647669  7.843...e-06
org-element-put-property                                      189         0.0005007950  2.649...e-06
org-element-restriction                                       189         0.0004014590  2.124...e-06
org-get-heading                                               10          0.000352205   3.52205e-05
org-time-stamp-to-now                                         6           0.000328877   5.481...e-05
org-string-nw-p                                               66          0.0003246779  4.919...e-06
org-agenda-get-category-icon                                  154         0.0003174880  2.061...e-06
org-inlinetask-outline-regexp                                 74          0.00029157    3.940...e-06
org-agenda-fix-displayed-tags                                 154         0.0002912199  1.891...e-06
org-property-inherit-p                                        126         0.000265318   2.105...e-06
org-time-string-to-time                                       6           0.000239531   3.992...e-05
org-agenda-deadline-face                                      74          0.0001995710  2.696...e-06
org-face-from-face-or-color                                   108         0.0001983859  1.836...e-06
org-entry-is-done-p                                           6           0.000187771   3.129...e-05
org-downcase-keep-props                                       62          0.0001747730  2.818...e-06
org-compile-prefix-format                                     3           0.000166394   5.546...e-05
org-element--next-mode                                        63          0.0001561909  2.479...e-06
org-in-commented-heading-p                                    2           0.0001554269  7.771...e-05
org-get-todo-state                                            6           0.000152144   2.535...e-05
org-not-nil                                                   72          0.0001507460  2.093...e-06
org-make-tags-matcher                                         1           0.000134331   0.000134331
org-file-menu-entry                                           63          0.0001202150  1.908...e-06
org-agenda-fontify-priorities                                 1           0.000102337   0.000102337
org-heading-components                                        2           0.000101918   5.0959e-05
org-date-to-gregorian                                         4           4.987...e-05  1.246...e-05
org-agenda-format-date-aligned                                1           4.806e-05     4.806e-05
org-days-to-iso-week                                          3           4.764e-05     1.588e-05
org-agenda-fit-window-to-buffer                               1           4.3799e-05    4.3799e-05
org-tags-expand                                               1           4.2542e-05    4.2542e-05
org-element-link-parser                                       1           4.0934e-05    4.0934e-05
org-agenda-mark-header-line                                   4           3.380...e-05  8.452...e-06
org-agenda-propertize-selected-todo-keywords                  1           3.0177e-05    3.0177e-05
org-agenda-span-name                                          4           2.8571e-05    7.14275e-06
org-current-line                                              2           2.4309e-05    1.21545e-05
org-agenda-prepare-window                                     1           2.0887e-05    2.0887e-05
org-agenda-update-agenda-type                                 2           1.844...e-05  9.220...e-06
org-agenda-get-day-face                                       1           1.7952e-05    1.7952e-05
org-link-get-parameter                                        6           1.7602e-05    2.933...e-06
org-rear-nonsticky-at                                         1           1.1316e-05    1.1316e-05
org-unhighlight                                               2           1.068...e-05  5.343...e-06
org-set-sorting-strategy                                      3           1.0059e-05    3.353e-06
org-agenda-set-mode-name                                      1           9.081e-06     9.081e-06
org-agenda-use-sticky-p                                       4           9.011e-06     2.25275e-06
org-fit-window-to-buffer                                      1           8.103e-06     8.103e-06
org-last                                                      2           4.96e-06      2.48e-06
org-remove-flyspell-overlays-in                               1           4.331e-06     4.331e-06
org-agenda-ndays-to-span                                      2           4.331e-06     2.1655e-06
org-agenda-add-time-grid-maybe                                1           4.261e-06     4.261e-06
org-get-at-bol                                                1           3.912e-06     3.912e-06
org-goto-line                                                 1           3.911e-06     3.911e-06
org-agenda-span-to-ndays                                      1           2.794e-06     2.794e-06
org-font-lock-add-tag-faces                                   1           2.305e-06     2.305e-06
org-agenda-mark-clocking-task                                 1           1.886e-06     1.886e-06

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-08-27 16:16 [ANN] Agenda speed up Nicolas Goaziou
                   ` (4 preceding siblings ...)
  2017-09-29 20:45 ` Nicolas Goaziou
@ 2017-10-02  0:11 ` Matt Lundin
  2017-10-02  0:39   ` Samuel Wales
  2017-10-02 15:28   ` Nicolas Goaziou
  5 siblings, 2 replies; 42+ messages in thread
From: Matt Lundin @ 2017-10-02  0:11 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Some feedback about the new agenda speed would be nice.

One small bug I found with wip speedup branch. When trying to reschedule
in the agenda with org-agenda-do-date-later or
org-agenda-do-date-earlier, org mode gives a message:

"Cannot find time stamp"

Best,
Mat

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02  0:11 ` Matt Lundin
@ 2017-10-02  0:39   ` Samuel Wales
  2017-10-02 15:46     ` Nicolas Goaziou
  2017-10-02 15:28   ` Nicolas Goaziou
  1 sibling, 1 reply; 42+ messages in thread
From: Samuel Wales @ 2017-10-02  0:39 UTC (permalink / raw)
  To: Nicolas Goaziou, Org Mode List

... and i am getting a fixed error from before ...

... but 9maint and 9master produce agenda in about 3s ...

... while wip produces agenda in 26.75s ...

for my 2d agenda.  elp as instructed shows no significant differences

org-agenda-prepare-buffers                            1
1.221983848   1.221983848
org-agenda-files                                      3
0.00037503    0.00012501

also there are sorting differences in time grid for same minute and
for scheduled for same day.  which i don't care about.

also a clocked entry gets its closing time which is an improvement i think.

also an inactive timestamp shows the headline above the headline that
contains it.  this is a bug but cannot mce.

9master is same as 9maint.  thus, all issues are in wip.

i am limited in ability to use computer.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-09-30  3:20   ` Kyle Meyer
@ 2017-10-02 13:41     ` Nicolas Goaziou
  2017-10-05 14:48       ` Kyle Meyer
  0 siblings, 1 reply; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-02 13:41 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: Org Mode List

Hello,

Kyle Meyer <kyle@kyleam.com> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> If there is no more feedback nor objection, I'll merge the branch in
>> master before the end of the week.
>
> One issue I noticed: The sorting of categories defined in
> org-agenda-sorting-strategy is not honored.  The default category
> sorting for the agenda is to order the categories as they appear in the
> agenda files.
>
> Take the following text as the agenda file.
>
>
> * y
> :PROPERTIES:
> :CATEGORY: y
> :END:
>
> ** TODO a
> SCHEDULED: <2017-09-29 Fri>
>
> * x
> :PROPERTIES:
> :CATEGORY: x
> :END:
>
> ** TODO b
> SCHEDULED: <2017-09-29 Fri>
>
> Running emacs -Q and "M-x org-agenda a" on master displays
>
>     Week-agenda (W39):
>     Monday     25 September 2017 W39
>     Tuesday    26 September 2017
>     Wednesday  27 September 2017
>     Thursday   28 September 2017
>     Friday     29 September 2017
>       y:          Scheduled:  TODO a
>       x:          Scheduled:  TODO b
>     Saturday   30 September 2017
>     Sunday      1 October 2017
>
> Running the same sequence on wip-agenda-speedup displays
>
>     Week-agenda (W39):
>     Monday     25 September 2017 W39
>     Tuesday    26 September 2017
>     Wednesday  27 September 2017
>     Thursday   28 September 2017
>     Friday     29 September 2017
>       x:          Scheduled:  TODO b
>       y:          Scheduled:  TODO a
>     Saturday   30 September 2017
>     Sunday      1 October 2017

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02  0:11 ` Matt Lundin
  2017-10-02  0:39   ` Samuel Wales
@ 2017-10-02 15:28   ` Nicolas Goaziou
  1 sibling, 0 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-02 15:28 UTC (permalink / raw)
  To: Org Mode List

Hello,

Matt Lundin <mdl@imapmail.org> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> Some feedback about the new agenda speed would be nice.
>
> One small bug I found with wip speedup branch. When trying to reschedule
> in the agenda with org-agenda-do-date-later or
> org-agenda-do-date-earlier, org mode gives a message:
>
> "Cannot find time stamp"

Fixed. Thank you.

Regards,
-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02  0:39   ` Samuel Wales
@ 2017-10-02 15:46     ` Nicolas Goaziou
  2017-10-02 18:11       ` Marco Wahl
  2017-10-02 20:39       ` Samuel Wales
  0 siblings, 2 replies; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-02 15:46 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> ... and i am getting a fixed error from before ...

Do you mean you get an error which was fixed earlier? What error?

> ... but 9maint and 9master produce agenda in about 3s ...
>
> ... while wip produces agenda in 26.75s ...

This is obviously a bug. I would need a complete ELP report to fix it.

> for my 2d agenda.  elp as instructed shows no significant differences
>
> org-agenda-prepare-buffers                            1
> 1.221983848   1.221983848
> org-agenda-files                                      3
> 0.00037503    0.00012501

This is not a complete ELP report. Use 

  M-x elp-instrument-package RET org RET

use the 26.75s command then display the report with

  M-x elp-results

> also there are sorting differences in time grid for same minute and
> for scheduled for same day.  which i don't care about.

I think I fixed sorting order.

> also an inactive timestamp shows the headline above the headline that
> contains it.  this is a bug but cannot mce.

I couldn't reproduce it after some quick tests.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02 15:46     ` Nicolas Goaziou
@ 2017-10-02 18:11       ` Marco Wahl
  2017-10-03  9:35         ` Nicolas Goaziou
  2017-10-02 20:39       ` Samuel Wales
  1 sibling, 1 reply; 42+ messages in thread
From: Marco Wahl @ 2017-10-02 18:11 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

Hi,

Here is my contribution to the testing.

I used my personal setting.  I started a fresh Emacs and executed the
block

#+begin_src emacs-lisp :results drawer
(elp-instrument-package "org-")
(org-agenda-list)
(elp-results)
(set-buffer "*ELP Profiling Results*")
(buffer-string)
#+end_src

With branch
- wip-agenda-speedup
- master.

The overall outcome (from elp) was:

| wip-agenda-speedup | 823.31343007 |
| master             |  13.70077639 |

Find details below.


HTH,  Marco


I have 13 org-agenda-files.

*** wip-agenda-speedup

- first agenda creation

#+begin_src emacs-lisp :results drawer
(elp-instrument-package "org-")
(org-agenda-list)
(elp-results)
(set-buffer "*ELP Profiling Results*")
(buffer-string)
#+end_src

#+RESULTS:
:RESULTS:
org-agenda-list                                               1           823.31343007  823.31343007
org-agenda--all-filtered-data                                 1           803.36990444  803.36990444
org-agenda--file-data                                         13          802.25572081  61.711978524
org-agenda--inactive-data                                     12          798.06812224  66.505676853
org-element-at-point                                          17192       787.87165159  0.0458278066
org-element--parse-to                                         17192       785.73708480  0.0457036461
org-at-clock-log-p                                            25911       784.47874411  0.0302758961
org-element--current-element                                  2547363     712.31832548  0.0002796296
org-element-clock-parser                                      1369922     290.01055289  0.0002116985
org-element-timestamp-parser                                  1381808     233.29855592  0.0001688357
org-element--list-struct                                      1136002     129.73331616  0.0001142016
org-parse-time-string                                         2752951     107.34721023  3.899...e-05
org-at-heading-p                                              3714980     34.288651923  9.229...e-06
org-element-plain-list-parser                                 1136003     30.732969505  2.705...e-05
org-element--collect-affiliated-keywords                      1150439     24.256669741  2.108...e-05
org-get-limited-outline-regexp                                2601514     23.139213300  8.894...e-06
org-item-re                                                   2272266     16.601373308  7.306...e-06
org-agenda-prepare                                            1           9.495683098   9.495683098
org-agenda-prepare-buffers                                    1           9.488834312   9.488834312
org-get-agenda-file-buffer                                    38          8.80048189    0.2315916286
org-mode                                                      12          8.0912638009  0.6742719834
org-element--cache-put                                        2547363     7.7647574699  3.048...e-06
org-set-startup-visibility                                    12          7.6124138650  0.6343678220
org-cycle-hide-drawers                                        12          6.696957008   0.5580797506
org-element-drawer-parser                                     13748       4.0234334710  0.0002926559
org-at-planning-p                                             28671       2.6218224390  9.144...e-05
org-element-planning-parser                                   10681       2.5078197379  0.0002347925
org-match-line                                                53012       1.9656340269  3.707...e-05
org-agenda--planning-data                                     12          1.880672274   0.1567226894
org-element-property-drawer-parser                            16252       1.6516716070  0.0001016288
org-agenda-day-entries                                        12          1.299214825   0.1082679020
org-agenda--timestamp-data                                    12          1.2739375050  0.1061614587
org-flag-drawer                                               5937        1.1515499559  0.0001939615
org-entry-get                                                 998         0.8434770640  0.0008451673
org-is-habit-p                                                918         0.8054251420  0.0008773694
org-overview                                                  12          0.8051965750  0.0670997145
org--property-local-values                                    974         0.6132794840  0.0006296503
org-get-property-block                                        1037        0.58271784    0.0005619265
org-inlinetask-in-task-p                                      2607        0.5429532830  0.0002082674
org-agenda-skip                                               16806       0.3787984219  2.253...e-05
org-refresh-category-properties                               13          0.335916684   0.0258397449
org-back-to-heading                                           2987        0.3043235760  0.0001018826
org-agenda-skip-eval                                          33612       0.2572300220  7.652...e-06
org-refresh-properties                                        38          0.2537020530  0.0066763698
org-in-src-block-p                                            27095       0.2413916310  8.909...e-06
org-element-src-block-parser                                  116         0.2356676359  0.0020316175
org-not-nil                                                   1891        0.2141648419  0.0001132548
org-agenda-finalize                                           1           0.201847639   0.201847639
org-before-first-heading-p                                    1097        0.1716094119  0.0001564351
org-refresh-effort-properties                                 25          0.1694282020  0.0067771280
org-days-to-iso-week                                          3           0.161462921   0.0538209736
org-outline-level                                             7887        0.1297796440  1.645...e-05
org-set-regexps-and-options                                   25          0.1006435809  0.0040257432
org--setup-collect-keywords                                   25          0.0951920580  0.0038076823
org-babel-hide-all-hashes                                     12          0.0821095139  0.0068424594
org-refresh-stats-properties                                  13          0.0727625480  0.0055971190
org-get-tags-at                                               50          0.0592328009  0.0011846560
org-up-heading-safe                                           78          0.0565932570  0.0007255545
org-at-property-p                                             63          0.0565928409  0.0008982990
org-agenda--diary-data                                        13          0.05276752    0.00405904
org-agenda--entry-from-timestamp                              15890       0.0522900119  3.290...e-06
org-cycle-show-empty-lines                                    12          0.0452315579  0.0037692964
org-element-type                                              23129       0.0435966250  1.884...e-06
org-macro-initialize-templates                                12          0.039294215   0.0032745179
org-set-visibility-according-to-property                      12          0.037157883   0.0030964902
org-update-radio-target-regexp                                12          0.0369556909  0.0030796409
org-macro--collect-macros                                     12          0.036945982   0.0030788318
org-element-property                                          17906       0.0365123760  2.039...e-06
org-element-paragraph-parser                                  286         0.0282467959  9.876...e-05
org-agenda--get-tags                                          25          0.0277671940  0.0011106877
org-cycle-hide-archived-subtrees                              12          0.027431114   0.0022859261
org-hide-archived-subtrees                                    12          0.02713219    0.0022610158
org-agenda--timestamp-to-absolute                             957         0.024496478   2.559...e-05
org-refresh-property                                          56          0.022455351   0.0004009884
org-end-of-subtree                                            141         0.0220041769  0.0001560579
org-habit-parse-todo                                          12          0.017869867   0.0014891555
org-find-base-buffer-visiting                                 38          0.0139618560  0.0003674172
org-today                                                     1816        0.013209591   7.274...e-06
org-inlinetask-outline-regexp                                 2607        0.0119785900  4.594...e-06
org-agenda-today-p                                            908         0.0117061740  1.289...e-05
org-babel-hide-hash                                           168         0.0109603229  6.524...e-05
org-element-keyword-parser                                    183         0.0100555199  5.494...e-05
org-install-agenda-files-menu                                 12          0.009468143   0.0007890119
org-agenda--entry-from-scheduled                              884         0.0079316880  8.972...e-06
org-agenda-files                                              15          0.006952572   0.0004635048
org-agenda-prepare-window                                     1           0.00551578    0.00551578
org-element-inlinetask-parser                                 14          0.005217412   0.0003726722
org-switch-to-buffer-other-window                             1           0.005154416   0.005154416
org-unescape-code-in-string                                   126         0.0045439220  3.606...e-05
org-element-comment-parser                                    113         0.0043518649  3.851...e-05
org-agenda-format-item                                        25          0.004345714   0.0001738285
org-time-string-to-time                                       252         0.0039358810  1.561...e-05
org-get-wdays                                                 895         0.0031695910  3.541...e-06
org-diary-sexp-entry                                          1           0.002928968   0.002928968
org-bbdb-anniversaries-future                                 1           0.002904942   0.002904942
org-bbdb-anniversaries                                        7           0.0028111440  0.0004015920
org-bbdb-make-anniv-hash                                      1           0.002746471   0.002746471
org-check-agenda-file                                         26          0.0026801890  0.0001030841
org-agenda-finalize-entries                                   1           0.002670832   0.002670832
org-element-item-parser                                       31          0.0026320699  8.490...e-05
org-in-commented-heading-p                                    4           0.002315336   0.000578834
org-make-options-regexp                                       25          0.0020423209  8.169284e-05
org-heading-components                                        16          0.0018827349  0.0001176709
org-find-invisible-foreground                                 12          0.001625081   0.0001354234
org-agenda-highlight-todo                                     25          0.0016224340  6.489...e-05
org-setup-filling                                             12          0.0015189280  0.0001265773
org-agenda-align-tags                                         1           0.001374074   0.001374074
org-get-scheduled-time                                        12          0.001160216   9.668...e-05
org-entry-properties                                          24          0.0010685109  4.452...e-05
org-habit-insert-consistency-graphs                           1           0.001031428   0.001031428
org-agenda-mode                                               1           0.000940494   0.000940494
org-string-nw-p                                               246         0.0009112310  3.704...e-06
org-element-example-block-parser                              10          0.0008223900  8.223...e-05
org-get-priority                                              13          0.000821273   6.317...e-05
org-get-time-of-day                                           47          0.0007218209  1.535...e-05
org-activate-links                                            1           0.00063249    0.00063249
org-add-props                                                 81          0.0005291930  6.533...e-06
org-habit-build-graph                                         3           0.0005285649  0.0001761883
org-duration-to-minutes                                       21          0.0004251289  2.024...e-05
org-agenda--entries-less-p                                    84          0.0003916759  4.662...e-06
org-split-string                                              46          0.0003850420  8.370...e-06
org-file-menu-entry                                           169         0.0003691159  2.184...e-06
org-agenda-new-marker                                         50          0.000356758   7.13516e-06
org-replace-escapes                                           12          0.0003323099  2.769...e-05
org-bbdb-anniv-extract-date                                   24          0.000310587   1.294...e-05
org-agenda-fix-displayed-tags                                 25          0.000309191   1.236764e-05
org-element-context                                           1           0.000261489   0.000261489
org-extract-log-state-settings                                51          0.0002383719  4.673...e-06
org-set-font-lock-defaults                                    12          0.000215882   1.799...e-05
org-plist-delete                                              20          0.000193952   9.6976e-06
org-agenda-fontify-priorities                                 1           0.000192974   0.000192974
org-get-repeat                                                12          0.000186618   1.55515e-05
org-get-category                                              25          0.00015819    6.3276e-06
org-agenda-get-category-icon                                  25          0.0001527430  6.109...e-06
org-habit-get-priority                                        12          0.0001483449  1.236...e-05
org-get-todo-face                                             20          0.000131859   6.592...e-06
org-habit-get-faces                                           63          0.0001311620  2.081...e-06
org-element--get-node-properties                              14          0.000126133   9.0095e-06
org-element--get-time-properties                              14          0.0001248770  8.919...e-06
org-reduced-level                                             55          0.0001165000  2.118...e-06
org-remove-uninherited-tags                                   50          0.0001030880  2.061...e-06
org-habit-duration-to-days                                    14          0.000102249   7.303...e-06
org-setup-comments-handling                                   12          0.000101899   8.491...e-06
org-babel-result-hide-spec                                    12          9.729e-05     8.1075e-06
org-macro--counter-initialize                                 12          9.0097e-05    7.508...e-06
org-property-inherit-p                                        38          8.464...e-05  2.227...e-06
org-tag-alist-to-groups                                       25          8.227...e-05  3.291...e-06
org-assign-fast-keys                                          12          8.0527e-05    6.710...e-06
org-base-buffer                                               26          7.249...e-05  2.788...e-06
org-compile-prefix-format                                     1           7.2077e-05    7.2077e-05
org-downcase-keep-props                                       18          7.033...e-05  3.907...e-06
org-remove-keyword-keys                                       10          6.565...e-05  6.565...e-06
org-compute-latex-and-related-regexp                          12          6.2369e-05    5.197...e-06
org--update-property-plist                                    12          5.9016e-05    4.918e-06
org-bbdb-anniv-split                                          24          5.021...e-05  2.092...e-06
org-agenda-time-of-day-to-ampm-maybe                          22          4.9379e-05    2.244...e-06
org-bbdb-date-list                                            1           4.7422e-05    4.7422e-05
org-face-from-face-or-color                                   26          4.337...e-05  1.668...e-06
org-agenda-fit-window-to-buffer                               1           4.1277e-05    4.1277e-05
org-agenda-format-date-aligned                                1           3.96e-05      3.96e-05
org-element-cache-reset                                       12          3.8414e-05    3.201...e-06
org-delete-all                                                12          3.834...e-05  3.195...e-06
org-element-fixed-width-parser                                3           3.7365e-05    1.2455e-05
org-load-modules-maybe                                        12          3.1917e-05    2.65975e-06
org-agenda-span-name                                          3           2.297...e-05  7.659...e-06
org-element-table-parser                                      1           2.0324e-05    2.0324e-05
org-agenda-get-day-face                                       1           1.9207e-05    1.9207e-05
org-agenda-mark-header-line                                   1           1.8997e-05    1.8997e-05
org-element-quote-block-parser                                1           1.4737e-05    1.4737e-05
org-agenda-set-mode-name                                      1           9.429e-06     9.429e-06
org-fit-window-to-buffer                                      1           5.797e-06     5.797e-06
org-time-stamp-format                                         2           4.68e-06      2.34e-06
org-agenda-ndays-to-span                                      2           4.121e-06     2.0605e-06
org-agenda-add-time-grid-maybe                                1           3.841e-06     3.841e-06
org-font-lock-add-tag-faces                                   1           2.863e-06     2.863e-06
org-set-sorting-strategy                                      1           2.794e-06     2.794e-06
org-agenda-reset-markers                                      1           2.793e-06     2.793e-06
org-agenda-mark-clocking-task                                 1           2.654e-06     2.654e-06
org-agenda-span-to-ndays                                      1           2.514e-06     2.514e-06
org-agenda-use-sticky-p                                       1           2.235e-06     2.235e-06
org-agenda--entry-from-diary                                  1           0             0.0
org-agenda--entry-from-deadline                               11          0             0.0
org-agenda--entry-from-range                                  20          0             0.0
:END:

*** master

#+begin_src emacs-lisp :results drawer
(elp-instrument-package "org-")
(org-agenda-list)
(elp-results)
(set-buffer "*ELP Profiling Results*")
(buffer-string)
#+end_src

#+RESULTS:
:RESULTS:
org-agenda-list                                               1           13.700776395  13.700776395
org-agenda-prepare                                            1           8.573225443   8.573225443
org-agenda-prepare-buffers                                    1           8.568445799   8.568445799
org-get-agenda-file-buffer                                    26          8.0825648820  0.3108678800
org-mode                                                      12          7.2976777259  0.6081398104
org-set-startup-visibility                                    12          6.811291707   0.5676076422
org-cycle-hide-drawers                                        12          6.307442376   0.525620198
org-element-at-point                                          6024        4.2155047760  0.0006997849
org-element--parse-to                                         6024        3.8390433169  0.0006372913
org-agenda-get-day-entries                                    13          2.6339755840  0.2026135064
org-element--current-element                                  10769       2.6014738869  0.0002415706
org-agenda-get-scheduled                                      13          2.2258653759  0.1712204135
org-entry-get                                                 998         1.1013129259  0.0011035199
org-is-habit-p                                                918         1.0687217250  0.0011641848
org-flag-drawer                                               5937        0.9834582340  0.0001656490
org--property-local-values                                    974         0.9089012980  0.0009331635
org-get-property-block                                        1037        0.8675254530  0.0008365722
org-at-heading-p                                              19836       0.6952596459  3.505...e-05
org-inlinetask-in-task-p                                      1983        0.5992982769  0.0003022179
org-at-planning-p                                             990         0.5796980760  0.0005855536
org-back-to-heading                                           3280        0.5264601119  0.0001605061
org-element-property-drawer-parser                            5698        0.4143673250  7.272...e-05
org-overview                                                  12          0.3989246429  0.0332437202
org-element-planning-parser                                   1975        0.3768869579  0.0001908288
org-agenda-get-timestamps                                     13          0.341634291   0.0262795608
org-element-drawer-parser                                     2470        0.3359372779  0.0001360069
org-get-limited-outline-regexp                                30811       0.3174354650  1.030...e-05
org-get-todo-state                                            917         0.2429317669  0.0002649201
org-element-timestamp-parser                                  2482        0.2417436820  9.739...e-05
org-refresh-properties                                        38          0.229535145   0.0060403985
org-agenda-format-item                                        25          0.206015257   0.0082406102
org-parse-time-string                                         3705        0.2030768510  5.481...e-05
org-element-property                                          17906       0.2011916389  1.123...e-05
org-agenda-skip                                               942         0.1544522409  0.0001639620
org-refresh-effort-properties                                 25          0.1452781280  0.0058111251
org-set-regexps-and-options                                   25          0.135382409   0.0054152963
org-refresh-category-properties                               13          0.1340081939  0.0103083226
org--setup-collect-keywords                                   25          0.1295748980  0.0051829959
org-outline-level                                             7912        0.1216057829  1.536...e-05
org-before-first-heading-p                                    1139        0.1020191239  8.956...e-05
org-refresh-stats-properties                                  13          0.071490858   0.0054992967
org-babel-hide-all-hashes                                     12          0.0675043440  0.0056253620
org-macro-initialize-templates                                12          0.0578063480  0.0048171956
org-macro--collect-macros                                     12          0.0554221459  0.0046185121
org-get-tags-at                                               50          0.0552408359  0.0011048167
org-up-heading-safe                                           78          0.0532105330  0.0006821863
org-update-radio-target-regexp                                12          0.047117784   0.003926482
org-at-property-p                                             63          0.0453062900  0.0007191474
org-agenda-finalize                                           1           0.043580141   0.043580141
org-cycle-show-empty-lines                                    12          0.040996611   0.0034163842
org-set-visibility-according-to-property                      12          0.03770537    0.0031421141
org-agenda--timestamp-to-absolute                             895         0.0349059590  3.900...e-05
org-time-string-to-absolute                                   895         0.0301148649  3.364...e-05
org-agenda-get-deadlines                                      13          0.029832421   0.0022948016
org-days-to-iso-week                                          3           0.0291286939  0.0097095646
org-cycle-hide-archived-subtrees                              12          0.0258210430  0.0021517535
org-hide-archived-subtrees                                    12          0.025564861   0.0021304050
org-in-src-block-p                                            938         0.0251302259  2.679...e-05
org-element-type                                              11961       0.0204131630  1.706...e-06
org-agenda-get-blocks                                         13          0.020157338   0.0015505644
org-element--cache-put                                        10769       0.0198406530  1.842...e-06
org-end-of-subtree                                            141         0.0187310950  0.0001328446
org-element-paragraph-parser                                  248         0.0184676459  7.446...e-05
org-habit-parse-todo                                          12          0.017474214   0.0014561844
org-refresh-property                                          56          0.016107823   0.0002876396
org-element--collect-affiliated-keywords                      3045        0.0155778470  5.115...e-06
org-element--list-struct                                      48          0.0151602730  0.0003158390
org-at-clock-log-p                                            42          0.0149853240  0.0003567934
org-agenda-get-sexps                                          13          0.0147750939  0.0011365456
org-element-src-block-parser                                  80          0.01411279    0.0001764098
org-element-keyword-parser                                    183         0.0113711409  6.213...e-05
org-install-agenda-files-menu                                 12          0.0105158459  0.0008763204
org-babel-hide-hash                                           168         0.0095399409  5.678...e-05
org-inlinetask-outline-regexp                                 1983        0.0092922429  4.685...e-06
org-find-base-buffer-visiting                                 26          0.0081029430  0.0003116516
org-agenda-files                                              15          0.0079172299  0.0005278153
org-time-string-to-time                                       292         0.0056979959  1.951...e-05
org-agenda-prepare-window                                     1           0.003665662   0.003665662
org-agenda-skip-eval                                          1876        0.0035327449  1.883...e-06
org-not-nil                                                   1891        0.0034513909  1.825...e-06
org-switch-to-buffer-other-window                             1           0.003399984   0.003399984
org-agenda-finalize-entries                                   1           0.003144152   0.003144152
org-get-wdays                                                 895         0.0030911920  3.453...e-06
org-diary-sexp-entry                                          1           0.002771195   0.002771195
org-bbdb-anniversaries-future                                 1           0.002745213   0.002745213
org-unescape-code-in-string                                   90          0.0027438129  3.048...e-05
org-bbdb-anniversaries                                        7           0.0026625910  0.0003803701
org-bbdb-make-anniv-hash                                      1           0.002597638   0.002597638
org-make-options-regexp                                       25          0.002387132   9.548528e-05
org-element-plain-list-parser                                 49          0.0021782359  4.445...e-05
org-element-clock-parser                                      24          0.002122571   8.844...e-05
org-in-commented-heading-p                                    4           0.001953904   0.000488476
org-element-inlinetask-parser                                 8           0.0017862810  0.0002232851
org-heading-components                                        16          0.001703098   0.0001064436
org-agenda-highlight-todo                                     25          0.0016502999  6.601...e-05
org-check-agenda-file                                         26          0.001567186   6.027...e-05
org-find-invisible-foreground                                 12          0.001505585   0.0001254654
org-element-item-parser                                       13          0.0014630530  0.0001125425
org-get-scheduled-time                                        12          0.0012519899  0.0001043324
org-match-line                                                42          0.0012399730  2.952...e-05
org-setup-filling                                             12          0.001191507   9.929225e-05
org-entry-properties                                          24          0.001085975   4.524...e-05
org-agenda-align-tags                                         1           0.001042114   0.001042114
org-element-example-block-parser                              10          0.001011313   0.0001011313
org-agenda-new-marker                                         50          0.0009946229  1.989...e-05
org-item-re                                                   338         0.0009119240  2.698...e-06
org-get-time-of-day                                           47          0.000905574   1.926...e-05
org-at-date-range-p                                           93          0.000883216   9.496...e-06
org-entries-lessp                                             74          0.0008117780  1.096...e-05
org-habit-insert-consistency-graphs                           1           0.000805698   0.000805698
org-agenda-mode                                               1           0.000784467   0.000784467
org-today                                                     79          0.000710781   8.997...e-06
org-get-priority                                              13          0.0006799119  5.230...e-05
org-string-nw-p                                               174         0.0006391910  3.673...e-06
org-add-props                                                 81          0.0005783650  7.140...e-06
org-agenda-fix-displayed-tags                                 25          0.0005550380  2.220...e-05
org-habit-build-graph                                         3           0.000453416   0.0001511386
org-file-menu-entry                                           169         0.0003707300  2.193...e-06
org-agenda-today-p                                            27          0.000361084   1.337...e-05
org-replace-escapes                                           12          0.000349559   2.912...e-05
org-split-string                                              46          0.0003323089  7.224...e-06
org-element-context                                           1           0.000329096   0.000329096
org-element-comment-parser                                    7           0.00032651    4.664...e-05
org-duration-to-minutes                                       21          0.000293548   1.397...e-05
org-extract-log-state-settings                                51          0.0002813990  5.517...e-06
org-bbdb-anniv-extract-date                                   24          0.000280487   1.168...e-05
org-set-font-lock-defaults                                    12          0.000222098   1.850...e-05
org-get-repeat                                                12          0.000174747   1.456225e-05
org-activate-links                                            1           0.000172999   0.000172999
org-plist-delete                                              20          0.0001689470  8.447...e-06
org-habit-get-priority                                        12          0.000161475   1.345625e-05
org-agenda-get-category-icon                                  25          0.0001584750  6.339...e-06
org-get-category                                              25          0.00014017    5.6068e-06
org-get-todo-face                                             20          0.0001399619  6.998...e-06
org-setup-comments-handling                                   12          0.000134304   1.119...e-05
org-macro--counter-initialize                                 12          0.000126902   1.057...e-05
org-habit-get-faces                                           63          0.0001189410  1.887...e-06
org-agenda-fontify-priorities                                 1           0.000103018   0.000103018
org-habit-duration-to-days                                    14          0.000102946   7.353...e-06
org-reduced-level                                             49          0.0001017559  2.076...e-06
org-tag-alist-to-groups                                       25          9.9176e-05    3.96704e-06
org-remove-uninherited-tags                                   50          9.498...e-05  1.899...e-06
org-property-inherit-p                                        38          9.093...e-05  2.393...e-06
org-element--get-time-properties                              8           8.8699e-05    1.108...e-05
org-assign-fast-keys                                          12          8.5976e-05    7.164...e-06
org-remove-keyword-keys                                       10          7.6128e-05    7.6128e-06
org-agenda-fit-window-to-buffer                               1           7.3544e-05    7.3544e-05
org-element--get-node-properties                              8           6.886...e-05  8.607...e-06
org--update-property-plist                                    12          6.6283e-05    5.523...e-06
org-downcase-keep-props                                       18          6.4466e-05    3.581...e-06
org-compute-latex-and-related-regexp                          12          6.285...e-05  5.237...e-06
org-compile-prefix-format                                     1           5.3638e-05    5.3638e-05
org-element-fixed-width-parser                                3           5.321...e-05  1.773...e-05
org-agenda-format-date-aligned                                1           4.9658e-05    4.9658e-05
org-bbdb-anniv-split                                          24          4.8401e-05    2.016...e-06
org-agenda-time-of-day-to-ampm-maybe                          22          4.812...e-05  2.187...e-06
org-face-from-face-or-color                                   26          4.3719e-05    1.6815e-06
org-bbdb-date-list                                            1           4.2255e-05    4.2255e-05
org-element-cache-reset                                       12          4.134...e-05  3.445...e-06
org-babel-result-hide-spec                                    12          4.078...e-05  3.399...e-06
org-delete-all                                                12          4.0719e-05    3.39325e-06
org-load-modules-maybe                                        12          3.408...e-05  2.840...e-06
org-agenda-get-day-face                                       1           2.654e-05     2.654e-05
org-agenda-span-name                                          3           2.1651e-05    7.217e-06
org-element-table-parser                                      1           1.8298e-05    1.8298e-05
org-agenda-mark-header-line                                   1           1.8019e-05    1.8019e-05
org-element-quote-block-parser                                1           1.4597e-05    1.4597e-05
org-agenda-set-mode-name                                      1           6.356e-06     6.356e-06
org-fit-window-to-buffer                                      1           5.937e-06     5.937e-06
org-agenda-add-time-grid-maybe                                1           5.727e-06     5.727e-06
org-agenda-ndays-to-span                                      2           4.19e-06      2.095e-06
org-time-stamp-format                                         2           4.051...e-06  2.025...e-06
org-font-lock-add-tag-faces                                   1           2.654e-06     2.654e-06
org-set-sorting-strategy                                      1           2.585e-06     2.585e-06
org-agenda-reset-markers                                      1           2.305e-06     2.305e-06
org-agenda-use-sticky-p                                       1           2.305e-06     2.305e-06
org-agenda-mark-clocking-task                                 1           2.165e-06     2.165e-06
org-agenda-span-to-ndays                                      1           2.095e-06     2.095e-06
:END:

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02 15:46     ` Nicolas Goaziou
  2017-10-02 18:11       ` Marco Wahl
@ 2017-10-02 20:39       ` Samuel Wales
  2017-10-03  9:36         ` Nicolas Goaziou
  1 sibling, 1 reply; 42+ messages in thread
From: Samuel Wales @ 2017-10-02 20:39 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

fr: org-git-version to show branch name.

On 10/2/17, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Do you mean you get an error which was fixed earlier? What error?

you fixed error.

>> ... but 9maint and 9master produce agenda in about 3s ...
>>
>> ... while wip produces agenda in 26.75s ...
>
> This is obviously a bug. I would need a complete ELP report to fix it.

org-element-at-point                                  1104
17.213785437  0.0155921969
org-element--parse-to                                 1104
17.098407592  0.0154876880
org-element--current-element                          69978
15.421312201  0.0002203737
org-at-clock-log-p                                    12745
12.127817233  0.0009515745
org-element-clock-parser                              38277
6.7017031099  0.0001750843
org-element-timestamp-parser                          39144
3.5316997229  9.022...e-05
org-element--list-struct                              28737
3.4365959609  0.0001195878
org-match-line                                        30147
1.5677620349  5.200...e-05
org-at-planning-p                                     19352
1.5514231689  8.016...e-05
org-agenda-prepare-buffers                            1
1.280418243   1.280418243
org-element-plain-list-parser                         28737
1.1539211430  4.015...e-05
org-parse-time-string                                 79904
1.0831344910  1.355...e-05
org-refresh-category-properties                       8
0.5659694900  0.0707461862
org-element--collect-affiliated-keywords              29844
0.4167584269  1.396...e-05
org-back-to-heading                                   3587
0.3900127680  0.0001087295
org-element-drawer-parser                             1095
0.3539328980  0.0003232263
org-end-of-subtree                                    197
0.3254195049  0.0016518756
org-at-heading-p                                      100926
0.3098276209  3.069...e-06
org-get-limited-outline-regexp                        75242
0.2670187110  3.548...e-06
org-entry-get                                         850
0.2172587780  0.0002555985
org-refresh-stats-properties                          8
0.215825033   0.0269781291
org-entry-properties                                  843
0.1923222459  0.0002281402
org-element-planning-parser                           852
0.1566764160  0.0001838925
org-refresh-properties                                16
0.129169336   0.0080730835
org-element-property-drawer-parser                    1005
0.0981411630  9.765...e-05
org-element--cache-put                                69978
0.0852441850  1.218...e-06
org-in-src-block-p                                    12813
0.0793080239  6.189...e-06
org-refresh-effort-properties                         8
0.0712755180  0.0089094397
org-at-property-p                                     121
0.0647199699  0.0005348757
org-item-re                                           57486
0.0632800570  1.100...e-06
org-get-priority                                      277
0.0614306549  0.0002217713
org-set-regexps-and-options                           8
0.058658      0.00733225
org--setup-collect-keywords                           8
0.0581624289  0.0072703036
org-outline-level                                     197
0.0578927239  0.0002938716
org-get-property-block                                128
0.050565393   0.0003950421
org-closest-date                                      980
0.0252995829  2.581...e-05
org-before-first-heading-p                            216
0.0231139179  0.0001070088
org-today                                             1955
0.0225680109  1.154...e-05
org-in-commented-heading-p                            81
0.0170685310  0.0002107226
org-get-tags-at                                       277
0.0109338869  3.947...e-05
org-heading-components                                81
0.0088255099  0.0001089569
org-activate-links                                    28
0.0064327669  0.0002297416
org-get-agenda-file-buffer                            32
0.0059095189  0.0001846724
org-find-base-buffer-visiting                         32
0.005762442   0.0001800763
org-date-to-gregorian                                 520
0.0040966750  7.878...e-06
org-refresh-property                                  7
0.003666006   0.0005237151
org-add-props                                         847
0.0036215150  4.275...e-06
org--property-local-values                            7
0.003564942   0.0005092774
org-days-to-iso-week                                  2
0.002134759   0.0010673795
org-get-wdays                                         956
0.0020431799  2.137...e-06
org-plist-delete                                      269
0.001759547   6.541...e-06
org-get-todo-face                                     269
0.0013906500  5.169...e-06
org-get-category                                      277
0.0011122950  4.015...e-06
org-element-paragraph-parser                          12
0.0009095570  7.579...e-05
org-element-link-parser                               27
0.000830357   3.075...e-05
org-eval                                              281
0.000795626   2.831...e-06
org-defkey                                            141
0.0006544269  4.641...e-06
org-check-agenda-file                                 16
0.0006322519  3.951...e-05
org-font-lock-add-tag-faces                           1
0.000499012   0.000499012
org-element-type                                      736
0.0004188689  5.691...e-07
org-agenda-files                                      3
0.000376301   0.0001254336
org-reduced-level                                     358
0.0003121549  8.719...e-07
org-make-options-regexp                               8
0.000269248   3.3656e-05
org-link-get-parameter                                184
0.0001648490  8.959...e-07
org-split-string                                      20
0.000147793   7.389...e-06
org-face-from-face-or-color                           325
0.0001268079  3.901...e-07
org-duration-to-minutes                               7
0.000109787   1.568...e-05
org-link-expand-abbrev                                22
9.702...e-05  4.410...e-06
org-do-emphasis-faces                                 1
7.6403e-05    7.6403e-05
org-base-buffer                                       32
4.9253e-05    1.539...e-06
org-tag-alist-to-groups                               8
4.812...e-05  6.015...e-06
org-element-property                                  81
3.881...e-05  4.792...e-07
org-key                                               141
3.810...e-05  2.702...e-07
org-get-tag-face                                      3
2.427...e-05  8.09e-06
org-remove-flyspell-overlays-in                       28
1.448...e-05  5.173...e-07
org-time-from-absolute                                2
1.1038e-05    5.519e-06
org-property-inherit-p                                16
1.094...e-05  6.839...e-07
org-file-menu-entry                                   8
8.375...e-06  1.046...e-06
org-not-nil                                           14
7.780...e-06  5.557...e-07
org-git-version                                       1
2.105e-06     2.105e-06

>
>> for my 2d agenda.  elp as instructed shows no significant differences

>> also an inactive timestamp shows the headline above the headline that
>> contains it.  this is a bug but cannot mce.
>
> I couldn't reproduce it after some quick tests.

maybe you fixed it.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02 18:11       ` Marco Wahl
@ 2017-10-03  9:35         ` Nicolas Goaziou
  2017-10-03 10:23           ` Marco Wahl
  0 siblings, 1 reply; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-03  9:35 UTC (permalink / raw)
  To: Marco Wahl; +Cc: emacs-orgmode

Hello,

Marco Wahl <marcowahlsoft@gmail.com> writes:

> The overall outcome (from elp) was:
>
> | wip-agenda-speedup | 823.31343007 |
> | master             |  13.70077639 |

Fixed. Could you test it again?

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02 20:39       ` Samuel Wales
@ 2017-10-03  9:36         ` Nicolas Goaziou
  2017-10-03 23:45           ` Samuel Wales
  0 siblings, 1 reply; 42+ messages in thread
From: Nicolas Goaziou @ 2017-10-03  9:36 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> fr: org-git-version to show branch name.
>
> On 10/2/17, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> Do you mean you get an error which was fixed earlier? What error?
>
> you fixed error.
>
>>> ... but 9maint and 9master produce agenda in about 3s ...
>>>
>>> ... while wip produces agenda in 26.75s ...
>>
>> This is obviously a bug. I would need a complete ELP report to fix it.
>
> org-element-at-point                                  1104
> 17.213785437  0.0155921969
> org-element--parse-to                                 1104
> 17.098407592  0.0154876880
> org-element--current-element                          69978
> 15.421312201  0.0002203737
> org-at-clock-log-p                                    12745
> 12.127817233  0.0009515745

Fixed. Could you test it again?

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-03  9:35         ` Nicolas Goaziou
@ 2017-10-03 10:23           ` Marco Wahl
  0 siblings, 0 replies; 42+ messages in thread
From: Marco Wahl @ 2017-10-03 10:23 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

>> The overall outcome (from elp) was:
>>
>> | wip-agenda-speedup | 823.31343007 |
>> | master             |  13.70077639 |
>
> Fixed.

Thanks!  Looks much better now.

>  Could you test it again?

Now the numbers (for the agenda today [2017-10-03 Tue 12:19]) are

| wip-agenda-speedup | 40.3 |
| master             | 13.9 |

Details below.


Best regards,  Marco


*** wip-agenda-speedup(f5bc563a6)

- first agenda creation

#+begin_src emacs-lisp :results drawer
(elp-instrument-package "org-")
(org-agenda-list)
(elp-results)
(set-buffer "*ELP Profiling Results*")
(buffer-string)
#+end_src

#+RESULTS:
:RESULTS:
org-agenda-list                                               1           40.319749877  40.319749877
org-agenda--all-filtered-data                                 1           25.853502855  25.853502855
org-agenda--file-data                                         13          24.455112311  1.8811624855
org-agenda--inactive-data                                     13          20.348160329  1.5652431022
org-agenda-prepare                                            1           8.6519741709  8.6519741709
org-agenda-prepare-buffers                                    1           8.647676857   8.647676857
org-get-agenda-file-buffer                                    39          8.192441179   0.2100625943
org-mode                                                      12          7.821512181   0.6517926817
org-set-startup-visibility                                    12          7.3841486830  0.6153457235
org-cycle-hide-drawers                                        12          6.8701314540  0.5725109545
org-element-at-point                                          6009        4.7852410630  0.0007963456
org-at-planning-p                                             28631       4.6709920739  0.0001631445
org-element--parse-to                                         6009        4.1859619890  0.0006966154
org-element--current-element                                  10699       2.7955038890  0.0002612864
org-agenda--planning-data                                     13          1.960562504   0.1508125003
org-agenda-day-entries                                        13          1.8965473350  0.1458882565
org-agenda--timestamp-data                                    13          1.5601358319  0.1200104486
org-agenda-skip                                               27955       1.0537350700  3.769...e-05
org-flag-drawer                                               5938        0.8942473320  0.0001505973
org-inlinetask-in-task-p                                      2619        0.8825332480  0.0003369733
org-agenda-skip-eval                                          55910       0.8576132569  1.533...e-05
org-entry-get                                                 1021        0.8163370580  0.0007995465
org--property-local-values                                    985         0.7918385440  0.0008038969
org-is-habit-p                                                929         0.7781246909  0.0008375938
org-get-property-block                                        1048        0.7403500450  0.0007064408
org-element-planning-parser                                   1963        0.6084338040  0.0003099509
org-element-timestamp-parser                                  2448        0.4564960249  0.0001864771
org-element-property-drawer-parser                            5684        0.4392262350  7.727...e-05
org-overview                                                  12          0.40986988    0.0341558233
org-element-drawer-parser                                     2454        0.3520127849  0.0001434444
org-get-limited-outline-regexp                                31331       0.3462765439  1.105...e-05
org-at-heading-p                                              19729       0.3450200739  1.748...e-05
org-back-to-heading                                           3113        0.3358626239  0.0001078903
org-agenda-finalize-entries                                   1           0.277405615   0.277405615
org-inlinetask-outline-regexp                                 2619        0.2371466240  9.054...e-05
org-before-first-heading-p                                    1108        0.2354297489  0.0002124817
org-refresh-properties                                        38          0.2335974369  0.0061473009
org-parse-time-string                                         3792        0.2318385470  6.113...e-05
org-element--collect-affiliated-keywords                      3023        0.2182822999  7.220...e-05
org-refresh-effort-properties                                 25          0.1549454639  0.0061978185
org-outline-level                                             7979        0.1289716940  1.616...e-05
org-refresh-category-properties                               13          0.1254479299  0.0096498407
org-get-tags-at                                               80          0.1213341579  0.0015166769
org-up-heading-safe                                           138         0.1174280409  0.0008509278
org-set-regexps-and-options                                   25          0.1001017429  0.0040040697
org--setup-collect-keywords                                   25          0.094989861   0.0037995944
org-agenda-finalize                                           1           0.083258973   0.083258973
org-babel-hide-all-hashes                                     12          0.074374916   0.0061979096
org-agenda--entry-from-timestamp                              27039       0.073813874   2.729...e-06
org-refresh-stats-properties                                  13          0.0683747129  0.0052595933
org-agenda--get-tags                                          40          0.064226862   0.0016056715
org-at-property-p                                             63          0.0493569159  0.0007834431
org-agenda--entry-from-scheduled                              884         0.046206065   5.226...e-05
org-cycle-show-empty-lines                                    12          0.042481528   0.0035401273
org-macro-initialize-templates                                12          0.0386467750  0.0032205645
org-set-visibility-according-to-property                      12          0.0368607739  0.0030717311
org-macro--collect-macros                                     12          0.036838773   0.0030698977
org-element-property                                          17909       0.0362434429  2.023...e-06
org-update-radio-target-regexp                                12          0.0349821610  0.0029151800
org-agenda--timestamp-to-absolute                             963         0.0339515659  3.525...e-05
org-agenda--diary-data                                        13          0.032970151   0.0025361654
org-habit-parse-todo                                          18          0.0313264140  0.0017403563
org-cycle-hide-archived-subtrees                              12          0.0244273419  0.0020356118
org-hide-archived-subtrees                                    12          0.024222986   0.0020185821
org-days-to-iso-week                                          3           0.023006545   0.0076688483
org-element-type                                              11947       0.0213248570  1.784...e-06
org-element--cache-put                                        10699       0.0200709570  1.875...e-06
org-element-paragraph-parser                                  248         0.0189086239  7.624...e-05
org-today                                                     1824        0.0168460989  9.235...e-06
org-end-of-subtree                                            141         0.0168066589  0.0001191961
org-refresh-property                                          56          0.016198688   0.0002892622
org-element--list-struct                                      42          0.0147186659  0.0003504444
org-find-base-buffer-visiting                                 39          0.01403875    0.0003599679
org-element-src-block-parser                                  80          0.013868963   0.0001733620
org-agenda-today-p                                            909         0.0124427890  1.368...e-05
org-babel-hide-hash                                           169         0.0104034679  6.155...e-05
org-install-agenda-files-menu                                 12          0.0094891     0.0007907583
org-element-keyword-parser                                    183         0.0089506699  4.891...e-05
org-agenda-format-item                                        40          0.0072112650  0.0001802816
org-agenda-files                                              15          0.0065298199  0.0004353213
org-time-string-to-time                                       361         0.005927918   1.642...e-05
org-agenda--entry-from-deadline                               11          0.004614328   0.0004194843
org-get-wdays                                                 895         0.0038406089  4.291...e-06
org-not-nil                                                   1913        0.0038065329  1.989...e-06
org-check-agenda-file                                         26          0.0037753100  0.0001452042
org-habit-insert-consistency-graphs                           1           0.003529819   0.003529819
org-diary-sexp-entry                                          3           0.003154697   0.0010515656
org-agenda-prepare-window                                     1           0.00312271    0.00312271
org-switch-to-buffer-other-window                             1           0.003080455   0.003080455
org-bbdb-anniversaries-future                                 1           0.003065579   0.003065579
org-bbdb-anniversaries                                        7           0.0029673820  0.0004239117
org-bbdb-make-anniv-hash                                      1           0.002887831   0.002887831
org-agenda-highlight-todo                                     40          0.0026767709  6.691...e-05
org-agenda-align-tags                                         1           0.002416397   0.002416397
org-element-plain-list-parser                                 43          0.0020899549  4.860...e-05
org-heading-components                                        22          0.0020691409  9.405...e-05
org-get-scheduled-time                                        18          0.0020466530  0.0001137029
org-make-options-regexp                                       25          0.0020389009  8.155...e-05
org-habit-build-graph                                         11          0.001998252   0.0001816592
org-element-inlinetask-parser                                 8           0.001996925   0.0002496156
org-unescape-code-in-string                                   90          0.001990148   2.211...e-05
org-in-commented-heading-p                                    4           0.001883502   0.0004708755
org-get-priority                                              22          0.001844109   8.382...e-05
org-entry-properties                                          36          0.0017051240  4.736...e-05
org-element-item-parser                                       13          0.0015261209  0.0001173939
org-find-invisible-foreground                                 12          0.001443009   0.0001202507
org-setup-filling                                             12          0.0012260069  0.0001021672
org-get-time-of-day                                           62          0.0010433710  1.682...e-05
org-add-props                                                 133         0.0009201679  6.918...e-06
org-element-example-block-parser                              10          0.00084076    8.4076e-05
org-item-re                                                   326         0.0008324599  2.553...e-06
org-agenda-mode                                               1           0.000808423   0.000808423
org-agenda--entries-less-p                                    157         0.0007642070  4.867...e-06
org-string-nw-p                                               174         0.000653023   3.753...e-06
org-habit-get-faces                                           231         0.0006170590  2.671...e-06
org-in-src-block-p                                            29          0.0005872320  2.024...e-05
org-agenda-fix-displayed-tags                                 40          0.0005535     1.38375e-05
org-replace-escapes                                           18          0.00054323    3.017...e-05
org-split-string                                              68          0.0005321309  7.825...e-06
org-match-line                                                55          0.0005056569  9.193...e-06
org-agenda-new-marker                                         80          0.0004940660  6.175...e-06
org-duration-to-minutes                                       21          0.00034041    1.621e-05
org-file-menu-entry                                           169         0.0003371220  1.994...e-06
org-get-repeat                                                18          0.00033161    1.842...e-05
org-bbdb-anniv-extract-date                                   24          0.0003110779  1.296...e-05
org-agenda-get-category-icon                                  40          0.0003001799  7.504...e-06
org-plist-delete                                              31          0.00027183    8.768...e-06
org-habit-get-priority                                        18          0.0002532490  1.406...e-05
org-get-category                                              40          0.0002448600  6.121...e-06
org-extract-log-state-settings                                51          0.0002422860  4.750...e-06
org-element-context                                           1           0.000236136   0.000236136
org-get-todo-face                                             31          0.0002329269  7.513...e-06
org-element-comment-parser                                    7           0.0002153930  3.077...e-05
org-activate-links                                            1           0.000208548   0.000208548
org-set-font-lock-defaults                                    12          0.0001810280  1.508...e-05
org-agenda-fontify-priorities                                 1           0.000177399   0.000177399
org-habit-duration-to-days                                    22          0.0001708349  7.765...e-06
org-remove-uninherited-tags                                   82          0.0001604269  1.956...e-06
org-downcase-keep-props                                       27          0.0001598719  5.921...e-06
org-reduced-level                                             70          0.000149246   2.132...e-06
org-element-clock-parser                                      2           0.0001137029  5.685...e-05
org-element--get-time-properties                              8           0.0001102789  1.378...e-05
org-setup-comments-handling                                   12          0.0001095820  9.131...e-06
org-property-inherit-p                                        38          8.520...e-05  2.242...e-06
org-element--get-node-properties                              8           8.0319e-05    1.003...e-05
org-base-buffer                                               27          7.584...e-05  2.809...e-06
org-macro--counter-initialize                                 12          7.473...e-05  6.227...e-06
org-agenda-fit-window-to-buffer                               1           7.2985e-05    7.2985e-05
org-assign-fast-keys                                          12          7.144...e-05  5.954...e-06
org-face-from-face-or-color                                   40          6.677...e-05  1.669...e-06
org-remove-keyword-keys                                       10          6.670...e-05  6.670...e-06
org-agenda-time-of-day-to-ampm-maybe                          26          6.565...e-05  2.525...e-06
org-tag-alist-to-groups                                       25          6.5164e-05    2.60656e-06
org-closest-date                                              1           5.8108e-05    5.8108e-05
org-compute-latex-and-related-regexp                          12          5.5032e-05    4.586e-06
org-bbdb-anniv-split                                          24          5.210...e-05  2.170...e-06
org-bbdb-date-list                                            1           4.7911e-05    4.7911e-05
org--update-property-plist                                    12          4.602...e-05  3.8355e-06
org-compile-prefix-format                                     1           4.3931e-05    4.3931e-05
org-babel-result-hide-spec                                    12          4.0858e-05    3.404...e-06
org-agenda-format-date-aligned                                1           4.0019e-05    4.0019e-05
org-delete-all                                                12          3.7227e-05    3.102...e-06
org-element-fixed-width-parser                                3           3.513e-05     1.171e-05
org-element-cache-reset                                       12          3.4432e-05    2.869...e-06
org-date-to-gregorian                                         2           3.2477e-05    1.62385e-05
org-load-modules-maybe                                        12          3.171...e-05  2.642...e-06
org-agenda-span-name                                          3           2.9822e-05    9.940...e-06
org-time-stamp-format                                         17          2.898...e-05  1.704...e-06
org-agenda-mark-header-line                                   1           2.8496e-05    2.8496e-05
org-agenda-get-day-face                                       1           2.1581e-05    2.1581e-05
org-element-table-parser                                      1           1.7251e-05    1.7251e-05
org-element-quote-block-parser                                1           1.5016e-05    1.5016e-05
org-fit-window-to-buffer                                      1           8.031e-06     8.031e-06
org-add-prop-inherited                                        2           6.565...e-06  3.282...e-06
org-agenda-set-mode-name                                      1           5.377e-06     5.377e-06
org-agenda-deadline-face                                      1           4.749e-06     4.749e-06
org-agenda-ndays-to-span                                      2           4.121e-06     2.0605e-06
org-agenda-add-time-grid-maybe                                1           3.492e-06     3.492e-06
org-agenda-reset-markers                                      1           2.654e-06     2.654e-06
org-agenda-mark-clocking-task                                 1           2.584e-06     2.584e-06
org-agenda-span-to-ndays                                      1           2.514e-06     2.514e-06
org-font-lock-add-tag-faces                                   1           2.514e-06     2.514e-06
org-set-sorting-strategy                                      1           2.445e-06     2.445e-06
org-agenda-use-sticky-p                                       1           2.235e-06     2.235e-06
org-agenda--entry-from-diary                                  1           0             0.0
org-agenda--entry-from-range                                  20          0             0.0
:END:

*** master [2017-10-03 Tue 12:11]

#+begin_src emacs-lisp :results drawer
(elp-instrument-package "org-")
(org-agenda-list)
(elp-results)
(set-buffer "*ELP Profiling Results*")
(buffer-string)
#+end_src

#+RESULTS:
:RESULTS:
org-agenda-list                                               1           13.935683099  13.935683099
org-agenda-prepare                                            1           7.961296214   7.961296214
org-agenda-prepare-buffers                                    1           7.956994219   7.956994219
org-get-agenda-file-buffer                                    26          7.487757052   0.2879906558
org-mode                                                      12          7.160900691   0.5967417242
org-set-startup-visibility                                    12          6.7385719239  0.5615476603
org-cycle-hide-drawers                                        12          6.1008665979  0.5084055498
org-element-at-point                                          6017        4.2213957589  0.0007015781
org-element--parse-to                                         6017        3.6419318060  0.0006052736
org-agenda-get-day-entries                                    13          2.7822575789  0.2140198137
org-agenda-get-scheduled                                      13          2.590370102   0.1992592386
org-element--current-element                                  10735       2.2444107129  0.0002090741
org-entry-get                                                 1008        1.1550105889  0.0011458438
org--property-local-values                                    976         1.1270700219  0.0011547848
org-is-habit-p                                                920         1.1259451840  0.0012238534
org-flag-drawer                                               5938        0.9446397379  0.0001590838
org-get-property-block                                        1039        0.9052940810  0.0008713128
org-at-planning-p                                             980         0.7988437779  0.0008151467
org-inlinetask-in-task-p                                      1986        0.6115117720  0.0003079112
org-back-to-heading                                           3349        0.5541295669  0.0001654612
org-overview                                                  12          0.538689899   0.0448908249
org-element-drawer-parser                                     2462        0.4766532979  0.0001936041
org-element-property-drawer-parser                            5692        0.3978351349  6.989...e-05
org-element-planning-parser                                   1969        0.3700330470  0.0001879294
org-at-heading-p                                              19787       0.3271121119  1.653...e-05
org-outline-level                                             7978        0.2863733700  3.589...e-05
org-get-todo-state                                            915         0.2588971849  0.0002829477
org-element-timestamp-parser                                  2462        0.2379949610  9.666...e-05
org-refresh-properties                                        38          0.214475461   0.0056440910
org-get-limited-outline-regexp                                30759       0.1886165700  6.132...e-06
org-agenda-skip                                               939         0.1717339780  0.0001828902
org-refresh-effort-properties                                 25          0.1381310539  0.0055252421
org-refresh-category-properties                               13          0.1365420090  0.0105032314
org-agenda-get-timestamps                                     13          0.1241545339  0.0095503487
org-set-regexps-and-options                                   25          0.1162466589  0.0046498663
org--setup-collect-keywords                                   25          0.110788783   0.0044315513
org-before-first-heading-p                                    1130        0.1029192490  9.107...e-05
org-get-tags-at                                               66          0.0886256489  0.0013428128
org-up-heading-safe                                           114         0.0850542719  0.0007460901
org-refresh-stats-properties                                  13          0.072177691   0.0055521300
org-babel-hide-all-hashes                                     12          0.0659096409  0.0054924700
org-agenda-finalize                                           1           0.065364316   0.065364316
org-agenda--timestamp-to-absolute                             895         0.04361633    4.873...e-05
org-at-property-p                                             63          0.0418340950  0.0006640332
org-cycle-show-empty-lines                                    12          0.0400114940  0.0033342911
org-macro-initialize-templates                                12          0.039622754   0.0033018961
org-macro--collect-macros                                     12          0.0379186050  0.0031598837
org-time-string-to-absolute                                   895         0.0349771309  3.908...e-05
org-parse-time-string                                         3742        0.0349495759  9.339...e-06
org-set-visibility-according-to-property                      12          0.034679818   0.0028899848
org-update-radio-target-regexp                                12          0.034059479   0.0028382899
org-element-property                                          17909       0.0339811520  1.897...e-06
org-agenda-get-deadlines                                      13          0.0335253979  0.0025788767
org-element-type                                              11955       0.0290634780  2.431...e-06
org-in-src-block-p                                            936         0.0275596139  2.944...e-05
org-habit-parse-todo                                          16          0.0239278349  0.0014954896
org-cycle-hide-archived-subtrees                              12          0.023853453   0.0019877877
org-hide-archived-subtrees                                    12          0.02364707    0.0019705891
org-end-of-subtree                                            141         0.0212218089  0.0001505092
org-element--cache-put                                        10735       0.0199408940  1.857...e-06
org-element--collect-affiliated-keywords                      3037        0.0197188099  6.492...e-06
org-agenda-get-blocks                                         13          0.018743314   0.0014417933
org-element-paragraph-parser                                  248         0.0161453979  6.510...e-05
org-refresh-property                                          56          0.0156863239  0.0002801129
org-element--list-struct                                      48          0.014614323   0.0003044650
org-element-src-block-parser                                  80          0.0137813120  0.0001722664
org-agenda-get-sexps                                          13          0.013680599   0.0010523537
org-days-to-iso-week                                          3           0.013303315   0.0044344383
org-inlinetask-outline-regexp                                 1986        0.0130140390  6.552...e-06
org-at-clock-log-p                                            31          0.0104448159  0.0003369295
org-element-keyword-parser                                    183         0.009921976   5.421...e-05
org-install-agenda-files-menu                                 12          0.0096223560  0.0008018630
org-babel-hide-hash                                           169         0.0095226929  5.634...e-05
org-time-string-to-time                                       359         0.0077760050  2.166...e-05
org-find-base-buffer-visiting                                 26          0.0076032199  0.0002924315
org-agenda-files                                              15          0.006743116   0.0004495410
org-agenda-format-item                                        33          0.005219865   0.0001581777
org-agenda-finalize-entries                                   1           0.00498959    0.00498959
org-get-wdays                                                 895         0.0048270779  5.393...e-06
org-agenda-skip-eval                                          1872        0.0044243479  2.363...e-06
org-not-nil                                                   1894        0.0041241959  2.177...e-06
org-habit-insert-consistency-graphs                           1           0.004118938   0.004118938
org-diary-sexp-entry                                          1           0.003151974   0.003151974
org-agenda-prepare-window                                     1           0.00314073    0.00314073
org-bbdb-anniversaries-future                                 1           0.003126691   0.003126691
org-switch-to-buffer-other-window                             1           0.003094215   0.003094215
org-bbdb-anniversaries                                        7           0.0030219969  0.0004317138
org-bbdb-make-anniv-hash                                      1           0.002941609   0.002941609
org-habit-build-graph                                         11          0.002825112   0.0002568283
org-agenda-highlight-todo                                     33          0.002351583   7.126...e-05
org-element-plain-list-parser                                 49          0.0020646749  4.213...e-05
org-unescape-code-in-string                                   90          0.002049524   2.277...e-05
org-make-options-regexp                                       25          0.001955229   7.820...e-05
org-heading-components                                        20          0.0018572409  9.286...e-05
org-agenda-align-tags                                         1           0.001763443   0.001763443
org-element-inlinetask-parser                                 8           0.0017329910  0.0002166238
org-in-commented-heading-p                                    4           0.001702401   0.0004256002
org-get-scheduled-time                                        16          0.0016673419  0.0001042088
org-item-re                                                   338         0.0015919719  4.709...e-06
org-entry-properties                                          32          0.0015919089  4.974...e-05
org-find-invisible-foreground                                 12          0.001411158   0.0001175965
org-entries-lessp                                             114         0.0013762419  1.207...e-05
org-element-item-parser                                       13          0.001318758   0.0001014429
org-check-agenda-file                                         26          0.0011953520  4.597...e-05
org-agenda-new-marker                                         66          0.0011339560  1.718...e-05
org-element-clock-parser                                      10          0.0010840889  0.0001084088
org-get-priority                                              17          0.0010395279  6.114...e-05
org-match-line                                                31          0.001009776   3.257...e-05
org-setup-filling                                             12          0.000996086   8.300...e-05
org-at-date-range-p                                           83          0.0009576050  1.153...e-05
org-today                                                     83          0.0009482440  1.142...e-05
org-add-props                                                 109         0.0009115110  8.362...e-06
org-agenda-mode                                               1           0.000819527   0.000819527
org-string-nw-p                                               174         0.0008057780  4.630...e-06
org-element-example-block-parser                              10          0.000794942   7.94942e-05
org-get-time-of-day                                           49          0.0007397650  1.509...e-05
org-habit-get-faces                                           231         0.0005604859  2.426...e-06
org-split-string                                              60          0.0005547559  9.245...e-06
org-agenda-today-p                                            27          0.0005402989  2.001...e-05
org-replace-escapes                                           16          0.000463122   2.894...e-05
org-bbdb-anniv-extract-date                                   24          0.0004513939  1.880...e-05
org-file-menu-entry                                           169         0.0004411170  2.610...e-06
org-agenda-fix-displayed-tags                                 33          0.0004208000  1.275...e-05
org-extract-log-state-settings                                51          0.0003321699  6.513...e-06
org-duration-to-minutes                                       21          0.0003251839  1.548...e-05
org-get-todo-face                                             25          0.000316734   1.266936e-05
org-habit-get-priority                                        16          0.000316524   1.978275e-05
org-element-context                                           1           0.000298645   0.000298645
org-plist-delete                                              25          0.00024808    9.9232e-06
org-agenda-get-category-icon                                  33          0.0002383010  7.221...e-06
org-get-repeat                                                16          0.000236486   1.478...e-05
org-element-comment-parser                                    7           0.000228805   3.268...e-05
org-get-category                                              33          0.0002264249  6.861...e-06
org-set-font-lock-defaults                                    12          0.0002119010  1.765...e-05
org-activate-links                                            1           0.000183126   0.000183126
org-habit-duration-to-days                                    20          0.0001659430  8.297...e-06
org-reduced-level                                             61          0.0001484880  2.434...e-06
org-remove-uninherited-tags                                   68          0.000140244   2.062...e-06
org-downcase-keep-props                                       23          0.000132836   5.775...e-06
org-agenda-fontify-priorities                                 1           0.000131931   0.000131931
org-property-inherit-p                                        38          0.00012998    3.420...e-06
org-element--get-time-properties                              8           0.000116986   1.462325e-05
org-setup-comments-handling                                   12          0.000113496   9.458e-06
org-tag-alist-to-groups                                       25          0.0001118849  4.475...e-06
org-macro--counter-initialize                                 12          0.0001087439  9.061...e-06
org-bbdb-anniv-split                                          24          9.3311e-05    3.887...e-06
org-assign-fast-keys                                          12          8.995...e-05  7.496...e-06
org-remove-keyword-keys                                       10          8.0946e-05    8.094...e-06
org-element--get-node-properties                              8           7.7594e-05    9.69925e-06
org-compute-latex-and-related-regexp                          12          7.528...e-05  6.274...e-06
org--update-property-plist                                    12          7.179...e-05  5.983...e-06
org-babel-result-hide-spec                                    12          6.3767e-05    5.313...e-06
org-time-stamp-format                                         17          6.1951e-05    3.644...e-06
org-delete-all                                                12          5.978...e-05  4.982...e-06
org-load-modules-maybe                                        12          5.615...e-05  4.679...e-06
org-element-cache-reset                                       12          5.6152e-05    4.679...e-06
org-agenda-fit-window-to-buffer                               1           5.5594e-05    5.5594e-05
org-face-from-face-or-color                                   31          5.259...e-05  1.696...e-06
org-agenda-time-of-day-to-ampm-maybe                          20          4.987...e-05  2.49355e-06
org-compile-prefix-format                                     1           4.4419e-05    4.4419e-05
org-bbdb-date-list                                            1           4.2813e-05    4.2813e-05
org-agenda-format-date-aligned                                1           4.2813e-05    4.2813e-05
org-element-fixed-width-parser                                3           3.925e-05     1.308...e-05
org-agenda-span-name                                          3           3.408...e-05  1.136...e-05
org-agenda-get-day-face                                       1           3.2547e-05    3.2547e-05
org-agenda-mark-header-line                                   1           2.221e-05     2.221e-05
org-element-table-parser                                      1           1.9207e-05    1.9207e-05
org-element-quote-block-parser                                1           1.6972e-05    1.6972e-05
org-add-prop-inherited                                        2           9.149e-06     4.5745e-06
org-fit-window-to-buffer                                      1           8.032e-06     8.032e-06
org-agenda-set-mode-name                                      1           7.823e-06     7.823e-06
org-agenda-ndays-to-span                                      2           6.286e-06     3.143e-06
org-agenda-deadline-face                                      1           6.216e-06     6.216e-06
org-agenda-add-time-grid-maybe                                1           5.377e-06     5.377e-06
org-set-sorting-strategy                                      1           4.679e-06     4.679e-06
org-agenda-reset-markers                                      1           4.54e-06      4.54e-06
org-agenda-mark-clocking-task                                 1           4.54e-06      4.54e-06
org-font-lock-add-tag-faces                                   1           4.54e-06      4.54e-06
org-agenda-use-sticky-p                                       1           4.47e-06      4.47e-06
org-agenda-span-to-ndays                                      1           2.025e-06     2.025e-06
:END:

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-03  9:36         ` Nicolas Goaziou
@ 2017-10-03 23:45           ` Samuel Wales
  2017-10-04  0:05             ` Samuel Wales
  0 siblings, 1 reply; 42+ messages in thread
From: Samuel Wales @ 2017-10-03 23:45 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

On 10/3/17, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> org-element-at-point                                  1104
>> 17.213785437  0.0155921969
>> org-element--parse-to                                 1104
>> 17.098407592  0.0154876880
>> org-element--current-element                          69978
>> 15.421312201  0.0002203737
>> org-at-clock-log-p                                    12745
>> 12.127817233  0.0009515745
>
> Fixed. Could you test it again?

still much slower.  check out the filenames for the times.

--- "elp-results--(14.120262055 14 0.868587649)--release_9.1.1-114-gf5bc56"	
+++ "elp-results--(2.823281612 3
0.13669316199999998)--release_9.1.1-99-g7a2b64"
@@ -1,85 +1,85 @@
-org-at-planning-p                                     19438
1.7517455880  9.011...e-05
-org-agenda-prepare-buffers                            1
1.280357753   1.280357753
-org-refresh-category-properties                       8
0.5655261619  0.0706907702
-org-back-to-heading                                   3831
0.4543286779  0.0001185927
-org-parse-time-string                                 2739
0.3607386119  0.0001317044
-org-matcher-time                                      195
0.3364286490  0.0017252751
-org-2ft                                               192
0.3350386229  0.0017449928
-org-end-of-subtree                                    197
0.2835889550  0.0014395378
-org-refresh-stats-properties                          8
0.216994121   0.0271242651
-org-entry-get                                         1001
0.1716580229  0.0001714865
-org-entry-properties                                  994
0.1433018570  0.0001441668
-org-refresh-properties                                16
0.130269807   0.0081418629
-org-closest-date                                      1000
0.1084333750  0.0001084333
-org-at-property-p                                     121
0.1060563869  0.0008764990
-org-get-property-block                                128
0.092064553   0.0007192543
-org-refresh-effort-properties                         8
0.071788969   0.0089736211
-org-get-priority                                      312
0.0678388049  0.0002174320
-org-set-regexps-and-options                           8
0.0584633600  0.0073079200
-org--setup-collect-keywords                           8
0.057983882   0.0072479852
-org-before-first-heading-p                            215
0.023083193   0.0001073636
-org-today                                             1985
0.0227823760  1.147...e-05
-org-in-commented-heading-p                            80
0.0167247850  0.0002090598
-org-outline-level                                     197
0.0147668000  7.495...e-05
-org-get-tags-at                                       321
0.0123168869  3.837...e-05
-org-heading-components                                80
0.0086148070  0.0001076850
-org-activate-links                                    35
0.0079194529  0.0002262700
-org-get-agenda-file-buffer                            32
0.005901701   0.0001844281
-org-find-base-buffer-visiting                         32
0.0057470019  0.0001795938
-org-get-limited-outline-regexp                        2009
0.0046851680  2.332...e-06
-org-date-to-gregorian                                 544
0.0042989290  7.902...e-06
-org-add-props                                         981
0.0042024999  4.283...e-06
-org-refresh-property                                  7
0.003612339   0.0005160484
-org--property-local-values                            7
0.0034815799  0.0004973685
-org-element-at-point                                  2
0.003142827   0.0015714135
-org-plist-delete                                      310
0.0022100709  7.129...e-06
-org-days-to-iso-week                                  2
0.0021368679  0.0010684339
-org-get-wdays                                         966
0.0021314989  2.206...e-06
-org-element-context                                   1
0.001709069   0.001709069
-org-element--parse-to                                 1
0.001696425   0.001696425
-org-get-todo-face                                     310
0.0016314150  5.262...e-06
-org-get-category                                      321
0.0013590150  4.233...e-06
-org-element-link-parser                               34
0.001083772   3.187...e-05
-org-element-headline-parser                           1
0.001021417   0.001021417
-org-eval                                              325
0.0009354789  2.878...e-06
-org-check-agenda-file                                 16
0.000722695   4.516...e-05
-org-defkey                                            141
0.0006374779  4.521...e-06
-org-font-lock-add-tag-faces                           1
0.00060773    0.00060773
-org-in-src-block-p                                    47
0.000511424   1.088...e-05
-org-element--current-element                          3
0.000489721   0.0001632403
-org-agenda-files                                      3
0.000378044   0.0001260146
-org-reduced-level                                     402
0.0003425939  8.522...e-07
-org-diary-sexp-entry                                  8
0.000293875   3.673...e-05
-org-make-options-regexp                               8
0.0002602499  3.253...e-05
-org-element--object-lex                               1
0.00022519    0.00022519
-org-time-string-to-seconds                            10
0.0002250960  2.250...e-05
-org-link-get-parameter                                233
0.0002078269  8.919...e-07
-org-match-line                                        51
0.0002074589  4.067...e-06
-org-element-timestamp-parser                          2
0.000183573   9.17865e-05
-org-time-string-to-time                               10
0.000180712   1.80712e-05
-org-do-emphasis-faces                                 1
0.000178509   0.000178509
-org-split-string                                      25
0.0001595440  6.381...e-06
-org-element-clock-parser                              1
0.000159325   0.000159325
-org-element-drawer-parser                             1
0.000149764   0.000149764
-org-face-from-face-or-color                           377
0.0001497409  3.971...e-07
-org-at-heading-p                                      6
0.000130681   2.178...e-05
-org-link-expand-abbrev                                29
0.000126611   4.365...e-06
-org-duration-to-minutes                               7
0.0001055150  1.507...e-05
-org-element--get-node-properties                      1
6.9899e-05    6.9899e-05
-org-element--get-time-properties                      1
6.3057e-05    6.3057e-05
-org-element-property-drawer-parser                    1
5.853e-05     5.853e-05
-org-tag-alist-to-groups                               8
5.0166e-05    6.27075e-06
-org-element-property                                  104
4.982e-05     4.790...e-07
-org-base-buffer                                       32
4.267...e-05  1.333...e-06
-org-key                                               141
4.161...e-05  2.951...e-07
-org-get-tag-face                                      3
2.522...e-05  8.407...e-06
-org-remove-flyspell-overlays-in                       35
1.793...e-05  5.125...e-07
-org-element--collect-affiliated-keywords              1
1.512e-05     1.512e-05
-org-element-footnote-reference-parser                 1
1.3428e-05    1.3428e-05
-org-property-inherit-p                                16
1.063...e-05  6.649...e-07
-org-time-from-absolute                                2
1.0639e-05    5.3195e-06
-org-file-menu-entry                                   8
9.373...e-06  1.171...e-06
-org-not-nil                                           14
7.278...e-06  5.198...e-07
-org-git-version                                       1
1.823e-06     1.823e-06
-org-element--cache-put                                3
1.710...e-06  5.7e-07
-org-element-type                                      1
6.73e-07      6.73e-07
+org-agenda-prepare-buffers                            1
1.274363975   1.274363975
+org-refresh-category-properties                       8
0.5223036390  0.0652879548
+org-back-to-heading                                   4175
0.3902071139  9.346...e-05
+org-end-of-subtree                                    269
0.3046045960  0.0011323590
+org-at-planning-p                                     1430
0.2531864990  0.0001770534
+org-refresh-stats-properties                          8
0.215502252   0.0269377815
+org-entry-get                                         977
0.1621657140  0.0001659833
+org-get-todo-state                                    993
0.1610573420  0.0001621926
+org-entry-properties                                  970
0.1346187400  0.0001387822
+org-refresh-properties                                16
0.1290194969  0.0080637185
+org-time-string-to-absolute                           997
0.0833316159  8.358...e-05
+org-closest-date                                      990
0.0782311110  7.902...e-05
+org-refresh-effort-properties                         8
0.0710265269  0.0088783158
+org-at-property-p                                     121
0.0640767670  0.0005295600
+org-parse-time-string                                 1036
0.0587552579  5.671...e-05
+org-set-regexps-and-options                           8
0.058292958   0.0072866197
+org--setup-collect-keywords                           8
0.057765279   0.0072206598
+org-get-property-block                                128
0.0501299259  0.0003916400
+org-outline-level                                     582
0.0454880059  7.815...e-05
+org-get-priority                                      304
0.0389058880  0.0001279798
+org-before-first-heading-p                            300
0.0282599409  9.419...e-05
+org-at-date-range-p                                   380
0.0249748319  6.572...e-05
+org-get-tags-at                                       313
0.0247945759  7.921...e-05
+org-in-commented-heading-p                            80
0.0168997969  0.0002112474
+org-heading-components                                80
0.0086376659  0.0001079708
+org-activate-links                                    34
0.0079095950  0.0002326351
+org-in-src-block-p                                    1014
0.0077133719  7.606...e-06
+org-at-clock-log-p                                    85
0.0074070610  8.714...e-05
+org-match-line                                        85
0.0056585140  6.657...e-05
+org-add-props                                         958
0.004509359   4.707...e-06
+org-date-to-gregorian                                 524
0.0041814099  7.979...e-06
+org-refresh-property                                  7
0.0036240370  0.0005177195
+org--property-local-values                            7
0.0034185350  0.0004883621
+org-get-limited-outline-regexp                        1326
0.0032084940  2.419...e-06
+org-days-to-iso-week                                  2
0.0030286239  0.0015143119
+org-element-at-point                                  3
0.002689177   0.0008963923
+org-get-category                                      313
0.0021981879  7.022...e-06
+org-get-wdays                                         966
0.0020041910  2.074...e-06
+org-plist-delete                                      305
0.0019779859  6.485...e-06
+org-element-context                                   1
0.001688211   0.001688211
+org-get-todo-face                                     305
0.0015611989  5.118...e-06
+org-element--parse-to                                 2
0.001241767   0.0006208835
+org-today                                             83
0.0012195429  1.469...e-05
+org-element-link-parser                               33
0.0010643399  3.225...e-05
+org-element-headline-parser                           1
0.001012917   0.001012917
+org-eval                                              317
0.0008928330  2.816...e-06
+org-check-agenda-file                                 24
0.000803681   3.348...e-05
+org-element--current-element                          6
0.0006666039  0.0001111006
+org-defkey                                            141
0.0006587890  4.672...e-06
+org-time-string-to-time                               34
0.000608303   1.789...e-05
+org-font-lock-add-tag-faces                           1
0.000573944   0.000573944
+org-agenda-files                                      3
0.0003822590  0.0001274196
+org-reduced-level                                     394
0.0003619940  9.187...e-07
+org-make-options-regexp                               8
0.000326306   4.078825e-05
+org-get-agenda-file-buffer                            24
0.000298869   1.245...e-05
+org-element-clock-parser                              2
0.0002706479  0.0001353239
+org-element-timestamp-parser                          3
0.000265097   8.836...e-05
+org-time-string-to-seconds                            10
0.000251105   2.51105e-05
+org-element--object-lex                               1
0.000224171   0.000224171
+org-link-get-parameter                                226
0.0002107110  9.323...e-07
+org-find-base-buffer-visiting                         24
0.00017819    7.424...e-06
+org-at-heading-p                                      11
0.0001737199  1.579...e-05
+org-do-emphasis-faces                                 1
0.000163429   0.000163429
+org-face-from-face-or-color                           372
0.0001473109  3.959...e-07
+org-split-string                                      23
0.0001465090  6.369...e-06
+org-duration-to-minutes                               9
0.000123819   1.375...e-05
+org-link-expand-abbrev                                28
0.000122804   4.385...e-06
+org-element-drawer-parser                             2
9.539...e-05  4.769...e-05
+org-element--get-node-properties                      1
6.962e-05     6.962e-05
+org-element--get-time-properties                      1
6.2192e-05    6.2192e-05
+org-element-property-drawer-parser                    2
6.1388e-05    3.0694e-05
+org-element-property                                  101
5.278...e-05  5.226...e-07
+org-tag-alist-to-groups                               8
4.5141e-05    5.642625e-06
+org-key                                               141
3.937...e-05  2.792...e-07
+org-get-tag-face                                      3
2.6399e-05    8.799...e-06
+org-element--collect-affiliated-keywords              2
2.363...e-05  1.181...e-05
+org-time-from-absolute                                2
1.9812e-05    9.906e-06
+org-remove-flyspell-overlays-in                       34
1.891...e-05  5.562...e-07
+org-element-footnote-reference-parser                 1
1.2906e-05    1.2906e-05
+org-property-inherit-p                                16
1.056...e-05  6.601...e-07
+org-file-menu-entry                                   8
8.996e-06     1.1245e-06
+org-not-nil                                           14
8.022e-06     5.730...e-07
+org-element--cache-put                                6
3.465e-06     5.775e-07
+org-element-type                                      3
1.962...e-06  6.543...e-07
+org-git-version                                       1
1.793e-06     1.793e-06

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-03 23:45           ` Samuel Wales
@ 2017-10-04  0:05             ` Samuel Wales
  0 siblings, 0 replies; 42+ messages in thread
From: Samuel Wales @ 2017-10-04  0:05 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

bugs:

the following line will produce an entry in the agenda.

#   S CHEDULED: <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))>

and tel: links are interpreted as timestamps.

and the closing time for clocks are not listed.

and it misses an entire, normal looking inactive timestamp that is the
entry after tel.

===

personal opinion: i was excited that the agenda was going to be sped
up, but i thought that that would apply to my regular 2d agenda, which
is the only view i commonly use.  but if the speedup will slow down 2d
in order to make 30d faster, i personally do not favor this branch.  i
almost never do n greater than 2.

i /expect/ 30d to be slow, but i want 1d and 2d to be extremely fast.
like instant.

ymmv.

===

unlikely i can contribute to further testing much if at all, for health reasons.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [ANN] Agenda speed up
  2017-10-02 13:41     ` Nicolas Goaziou
@ 2017-10-05 14:48       ` Kyle Meyer
  0 siblings, 0 replies; 42+ messages in thread
From: Kyle Meyer @ 2017-10-05 14:48 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Kyle Meyer <kyle@kyleam.com> writes:
>
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>>
>>> If there is no more feedback nor objection, I'll merge the branch in
>>> master before the end of the week.
>>
>> One issue I noticed: The sorting of categories defined in
>> org-agenda-sorting-strategy is not honored.  The default category
>> sorting for the agenda is to order the categories as they appear in the
>> agenda files.

[...]

> Fixed. Thank you.

Thank you.  Hit a second issue today.

    (setq org-agenda-custom-commands
          '(("u" "Unschedule TODO entries" alltodo ""
             ((org-agenda-skip-function
               (lambda ()
                 (org-agenda-skip-entry-if 'scheduled 'deadline)))
              (org-agenda-overriding-header "Unscheduled TODO entries: ")))))

On master and with an agenda file that contains

    * TODO not scheduled
    
    * TODO scheduled
    SCHEDULED: <2017-10-07 Sat>

running "M-x org-agenda u" shows the "not scheduled" heading only.
wip-agenda-speedup show both entries.

-- 
Kyle

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2017-10-05 14:48 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-27 16:16 [ANN] Agenda speed up Nicolas Goaziou
2017-08-27 16:22 ` Nicolas Goaziou
2017-08-27 20:05 ` Samuel Wales
2017-08-31 17:17   ` Nicolas Goaziou
2017-08-27 20:53 ` Russell Adams
2017-08-28  8:32   ` Colin Baxter
2017-08-28 10:12 ` Eric S Fraga
2017-08-28 14:24   ` Nicolas Goaziou
2017-08-29  6:52     ` Eric S Fraga
2017-08-29 15:56       ` Robert Horn
2017-08-29  8:06     ` Eric S Fraga
2017-08-30  9:00       ` Nicolas Goaziou
2017-08-30  9:41         ` Eric S Fraga
2017-08-30 15:00           ` Nicolas Goaziou
2017-08-30 15:37             ` Eric S Fraga
2017-08-30  9:42         ` Eric S Fraga
2017-09-29 20:45 ` Nicolas Goaziou
2017-09-29 20:56   ` Samuel Wales
2017-09-30  8:55     ` Nicolas Goaziou
2017-09-30 19:03       ` Matt Lundin
2017-10-01 17:33         ` Nicolas Goaziou
2017-10-01 17:57           ` Samuel Wales
2017-10-01 17:58             ` Samuel Wales
2017-10-01 22:59             ` Nicolas Goaziou
2017-10-01 23:49           ` Matt Lundin
2017-09-30  3:20   ` Kyle Meyer
2017-10-02 13:41     ` Nicolas Goaziou
2017-10-05 14:48       ` Kyle Meyer
2017-09-30 18:54   ` Matt Lundin
2017-09-30 19:53     ` Matt Lundin
2017-10-01 17:13     ` Nicolas Goaziou
2017-10-02  0:11 ` Matt Lundin
2017-10-02  0:39   ` Samuel Wales
2017-10-02 15:46     ` Nicolas Goaziou
2017-10-02 18:11       ` Marco Wahl
2017-10-03  9:35         ` Nicolas Goaziou
2017-10-03 10:23           ` Marco Wahl
2017-10-02 20:39       ` Samuel Wales
2017-10-03  9:36         ` Nicolas Goaziou
2017-10-03 23:45           ` Samuel Wales
2017-10-04  0:05             ` Samuel Wales
2017-10-02 15:28   ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.