From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Exporting large documents Date: Tue, 07 May 2013 12:26:54 +0200 Message-ID: <871u9j83j2.fsf@bzg.ath.cx> References: <877gjnojsq.fsf@Rainer.invalid> <5654CA29-5F6D-4E8B-8B8B-C3609D76D189@gmail.com> <8761z5gw6w.fsf@gmx.li> <707EAAA5-D27C-47B7-9A1E-874C3A375BD9@gmail.com> <87zjwcwc4b.fsf@gmx.li> <877gjfgnl9.fsf@gmail.com> <0F877AB5-D488-4223-B0E7-F11B4B973614@gmail.com> <87ip2xfd0x.fsf@gmail.com> <51878F09.1050904@ed.ac.uk> <878v3sxeyc.fsf@gmx.li> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZfWR-0003Uu-Pb for emacs-orgmode@gnu.org; Tue, 07 May 2013 06:53:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZfWQ-0000T2-Ii for emacs-orgmode@gnu.org; Tue, 07 May 2013 06:53:27 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:41691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZfWQ-0000So-Bn for emacs-orgmode@gnu.org; Tue, 07 May 2013 06:53:26 -0400 Received: by mail-wi0-f181.google.com with SMTP id ey16so455878wid.2 for ; Tue, 07 May 2013 03:53:25 -0700 (PDT) In-Reply-To: <878v3sxeyc.fsf@gmx.li> (Lawrence Mitchell's message of "Mon, 06 May 2013 17:15:07 +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: Lawrence Mitchell Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Lawrence and all, Lawrence Mitchell writes: > org-up-heading-safe 263822 84.507423221 0.0003203198 > org-element--parse-elements 3113 40.774293673 0.0130980705 > org-back-to-heading 1209279 40.394825581 3.340...e-05 > org-element-headline-parser 59033 32.808386543 0.0005557634 Given the above, I wonder how the attached patch would help microoptimizing `org-up-heading-safe'. The idea is that maybe we don't need the better error that `org-up-heading-safe' provides, and the wrapping into (condition-case...) may slow down things. I've not tested -- feel free to test! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=org.el4.patch diff --git a/lisp/org.el b/lisp/org.el index 8ec6781..619fec4 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -22901,7 +22901,7 @@ Also, this function will be a lot faster than `outline-up-heading', because it relies on stars being the outline starters. This can really make a significant difference in outlines with very many siblings." (let (start-level re) - (org-back-to-heading t) + (outline-back-to-heading t) (setq start-level (funcall outline-level)) (if (equal start-level 1) nil --=-=-= Content-Type: text/plain -- Bastien --=-=-=--