From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: faster agenda with properties support disabled (no org-refresh-properties) Date: Tue, 3 Sep 2013 15:21:18 +0200 Message-ID: <45F2826E-23F1-4414-ABF9-3E028A352B1E@gmail.com> References: <87d2ppjg53.fsf@gmail.com> <87siyf1sm9.wl%n142857@gmail.com> <7BC61C18-28A7-41C7-8EC6-D2983A99C897@gmail.com> <87li3e2jv7.wl%n142857@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGqXx-0004kl-SR for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 09:21:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGqXp-0004gt-3t for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 09:21:29 -0400 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:37081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGqXo-0004gl-Rr for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 09:21:21 -0400 Received: by mail-wg0-f44.google.com with SMTP id b13so609358wgh.35 for ; Tue, 03 Sep 2013 06:21:20 -0700 (PDT) In-Reply-To: <87li3e2jv7.wl%n142857@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Daniel Clemente Cc: emacs-orgmode@gnu.org On Sep 3, 2013, at 2:02 PM, Daniel Clemente wrote: >=20 > Thank you. > With this on, I reduced 1'7 seconds my normal agenda time (C-a a), = from 13'5 to 11'8. Numbers are from elp but I checked them with an = external stopwatch because sometimes I have the impression that elp = makes things slower. > The strange thing is, I don't see the difference I saw days before in = (org-batch-agenda). I could reproduceably run a slow export (with no = patch) and a fast export (with the patch). Now both are fast. I suppose = that the contents of my agenda might have changed in a way that is fast = to handle. Anyway, this is only good. OK, I also have no idea why that happens. Thanks for the feedback. - Carsten >=20 > El Sat, 31 Aug 2013 07:58:00 +0200 Carsten Dominik va escriure: >>=20 >> Hi Daniel, >>=20 >> I have implemented a different version of the patch. Please take a = look at the new variable >> org-agenda-ignore-drawer-properties. >>=20 >> Regards, and thanks! >>=20 >> - Carsten >>=20 >> On 23.8.2013, at 11:24, Daniel Clemente wrote: >>=20 >>>>> So I would like to ask: is there a clean way to disable calls to >>>>> org-refresh-properties? >>>>=20 >>>> No, that would require a patch and a config variable. >>>>=20 >>>> - Carsten >>>>=20 >>>=20 >>> 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. >>>=20 >>>=20 >>> 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) >>>=20 >>> +(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. >>>=20 >>> @@ -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 >>>=20 >>=20