From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Fix massive slowdown in org-id-find Date: Wed, 25 Mar 2015 14:04:35 +0100 Message-ID: <877fu5mdng.fsf@nicolasgoaziou.fr> References: <87bnjj2565.fsf@sophokles.streitblatt.de> <87vbhrnz07.fsf@nicolasgoaziou.fr> <877fu6u03n.fsf@sophokles.streitblatt.de> <87twxarox9.fsf@sophokles.streitblatt.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yaky8-0000NB-94 for emacs-orgmode@gnu.org; Wed, 25 Mar 2015 09:03:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yaky2-0005TA-AX for emacs-orgmode@gnu.org; Wed, 25 Mar 2015 09:03:36 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:54510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yaky2-0005RD-2l for emacs-orgmode@gnu.org; Wed, 25 Mar 2015 09:03:30 -0400 In-Reply-To: <87twxarox9.fsf@sophokles.streitblatt.de> (Florian Beck's message of "Tue, 24 Mar 2015 23:49:54 +0100") 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: Florian Beck Cc: emacs-orgmode@gnu.org Florian Beck writes: >>> Could you profile it? > > Here are the results: > > With my setup and the patch I get, using > > (let ((time (current-time))) > (org-id-find "zangwill.nick_2014:aesthetic.judgment") > (format "%ss" (time-to-seconds (time-subtract (current-time) time)))) > > --> "0.027756516s" > > Without my patch, the result is > > --> "16.104403749s" > > profile-report returns: > > - command-execute 16095 99% > - call-interactively 16095 99% > - funcall-interactively 15905 98% > - eval-last-sexp 15879 98% > - elisp--eval-last-sexp 15879 98% > - eval 15879 98% > - let 15879 98% > - org-id-find 15879 98% > - org-id-find-id-in-file 15879 98% > - org-find-entry-with-id 15879 98% > - org-find-property 15879 98% > - save-excursion 15879 98% > - let 15879 98% > - catch 15879 98% > - while 15879 98% > - if 13311 82% > - if 13311 82% > - equal 13311 82% > - org-entry-get 11955 74% > - org-get-property-block 8876 55% > - org-inlinetask-in-task-p 3329 20% > org-inlinetask-outline-regexp 12 0% > - org-back-to-heading 3009 18% > - outline-back-to-heading 2000 12% > outline-on-heading-p 4 0% > org-before-first-heading-p 880 5% > org-get-limited-outline-regexp 24 0% > - # 939 5% > match-string-no-properties 44 0% > - execute-extended-command 20 0% > - sit-for 16 0% > redisplay 16 0% > + command-execute 4 0% > + previous-line 6 0% > + byte-code 190 1% > + timer-event-handler 15 0% > + ... 0 0% Thank you. Could you also send and updated patch containing the VALUE optional argument to `org-re-property' and changing modifying only the (re ...) line in `org-find-property', with a new profiling? Regards,