org-agenda: Fix slowdown introduced in 570b193

* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Do not check
multiple times the same entry.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/99842>
This commit is contained in:
Nicolas Goaziou 2015-08-11 14:42:34 +02:00
parent 9bb87f49f7
commit e8253c57f1

View file

@ -3867,7 +3867,7 @@ dimming them."
(goto-char (point-min))
(while (let ((pos (text-property-not-all
(point) (point-max) 'todo-state nil)))
(when pos (goto-char (1+ pos))))
(when pos (goto-char pos)))
(setq org-blocked-by-checkboxes nil)
(let ((marker (org-get-at-bol 'org-hd-marker)))
(when (and (markerp marker)
@ -3885,7 +3885,8 @@ dimming them."
(line-end-position))))
(if really-invisible (overlay-put ov 'invisible t)
(overlay-put ov 'face 'org-agenda-dimmed-todo-face))
(overlay-put ov 'org-type 'org-blocked-todo)))))))
(overlay-put ov 'org-type 'org-blocked-todo))))
(forward-line))))
(when (org-called-interactively-p 'interactive)
(message "Dim or hide blocked tasks...done")))