From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Shlyakhter Subject: [PATCH] tags search: faster tags matcher by trusting scanner tags Date: Thu, 15 Mar 2012 19:16:06 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf307f37eecce51104bb50464f Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Jtz-0006PG-Bq for emacs-orgmode@gnu.org; Thu, 15 Mar 2012 19:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8Jtx-0000zH-Nt for emacs-orgmode@gnu.org; Thu, 15 Mar 2012 19:16:10 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:54593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Jtx-0000z8-Gx for emacs-orgmode@gnu.org; Thu, 15 Mar 2012 19:16:09 -0400 Received: by vcbfk14 with SMTP id fk14so4712737vcb.0 for ; Thu, 15 Mar 2012 16:16:06 -0700 (PDT) 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: emacs-orgmode --20cf307f37eecce51104bb50464f Content-Type: multipart/alternative; boundary=20cf307f37eecce50c04bb50464d --20cf307f37eecce50c04bb50464d Content-Type: text/plain; charset=ISO-8859-1 The attached patch speeds up tags matching ( 50s --> 5s for my most common search ), by turning on org-trust-scanner-tags within the matcher. (When it's off, getting a non-inherited property's value causes a call to org-entry-properties to fetch all properties into a cache, including ALLTAGS; fetching ALLTAGS involves calling (org-get-tags-at), which is slow when org-trust-scanner-tags is off.) Can this cause problems / was this off for a reason? thanks, ilya --20cf307f37eecce50c04bb50464d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The attached patch speeds up tags matching ( 50s --> 5s for my most comm= on search ),
by turning on org-trust-scanner-tags within the matcher.
(When it's off, getting a non-inherited property's value cause= s a call to org-entry-properties
to fetch all properties into a cache, including ALLTAGS; fetching ALLTAGS i= nvolves
calling (org-get-tags-at), which is slow when org-trust-scanner-= tags is off.)

Can this cause problems / was this off for a reason?
thanks,

ilya

--20cf307f37eecce50c04bb50464d-- --20cf307f37eecce51104bb50464f Content-Type: application/octet-stream; name="0022-Tags-matcher-turned-on-org-trust-scanner-tags-within.patch" Content-Disposition: attachment; filename="0022-Tags-matcher-turned-on-org-trust-scanner-tags-within.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gzueuc4y0 RnJvbSA0MGVmNGY5YmE2N2E2YjA0NjZjYTA2N2QyOWYwN2M5YTYyNTkyOWI0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBJbHlhIFNobHlha2h0ZXIgPGlseWFfc2hsQGFsdW0ubWl0LmVk dT4KRGF0ZTogVGh1LCAxNSBNYXIgMjAxMiAxOTowNTowNiAtMDQwMApTdWJqZWN0OiBbUEFUQ0gg MjIvMjJdIFRhZ3MgbWF0Y2hlcjogdHVybmVkIG9uIG9yZy10cnVzdC1zY2FubmVyLXRhZ3Mgd2l0 aGluCiB0aGUgbWF0Y2hlci4KCiogbGlzcC9vcmcuZWwgKG9yZy1tYWtlLXRhZ3MtbWF0Y2hlcik6 IEJpbmQgb3JnLXRydXN0LXNjYW5uZXItdGFncyB0byB0CmFyb3VuZCB0aGUgbWF0Y2hlciwgc28g dGhhdCBnZXR0aW5nIHRoZSBBTExUQUdTIHByb3BlcnR5IGRvZXMgbm90IHRha2UKc28gbG9uZy4K ClRJTllDSEFOR0UKLS0tCiBsaXNwL29yZy5lbCB8ICAgIDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAx IGluc2VydGlvbigrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3Avb3JnLmVsIGIv bGl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