[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] faster agenda with properties support disabled (no org-refresh-p
From: |
Daniel Clemente |
Subject: |
Re: [O] faster agenda with properties support disabled (no org-refresh-properties) |
Date: |
Fri, 23 Aug 2013 16:24:12 +0700 |
>> So I would like to ask: is there a clean way to disable calls to
>> org-refresh-properties?
>
> No, that would require a patch and a config variable.
>
> - Carsten
>
I send a patch to do this. Setting this new variable to t reduced 10
seconds my agenda export time (down from 1 minute 6 seconds) as well
as the update.
You may add a comment about what to expect if your agenda depends on
property data.
diff --git a/lisp/org.el b/lisp/org.el
index 572b797..167e7a8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17656,6 +17656,14 @@ is not set, the tables are not re-aligned, etc."
:version "24.3"
:group 'org-agenda)
+(defcustom org-agenda-ignore-properties nil
+ "Avoid updating text properties when building the agenda.
+Properties are used for effort estimation, appointments, categories.
+If you don't use these in the agenda, set it to t and it will be faster."
+ :type 'boolean
+ :version "24.3"
+ :group 'org-agenda)
+
(defun org-duration-string-to-minutes (s &optional output-to-string)
"Convert a duration string S to minutes.
@@ -18017,9 +18025,11 @@ When a buffer is unmodified, it is just
killed. When modified, it is saved
;; this is only run for setting agenda tags from setup
;; file
(org-set-regexps-and-options)))
- (org-refresh-category-properties)
- (org-refresh-properties org-effort-property 'org-effort)
- (org-refresh-properties "APPT_WARNTIME" 'org-appt-warntime)
+ (unless org-agenda-ignore-properties
+ (org-refresh-category-properties)
+ (org-refresh-properties org-effort-property 'org-effort)
+ (org-refresh-properties "APPT_WARNTIME" 'org-appt-warntime)
+ )
(setq org-todo-keywords-for-agenda
(append org-todo-keywords-for-agenda org-todo-keywords-1))
(setq org-done-keywords-for-agenda
- Re: [O] Very slow performance in Org-mode on 10k line file?, (continued)
Re: [O] Very slow performance in Org-mode on 10k line file?, Nick Dokos, 2013/08/07
[O] faster agenda with properties support disabled (no org-refresh-properties), Daniel Clemente, 2013/08/11
Re: [O] faster agenda with properties support disabled (no org-refresh-properties), Carsten Dominik, 2013/08/31
Re: [O] faster agenda with properties support disabled (no org-refresh-properties), Bastien, 2013/08/31