emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Lawrence Mitchell <wence@gmx.li>
Cc: emacs-orgmode@gnu.org
Subject: Re: Exporting large documents
Date: Tue, 07 May 2013 12:26:54 +0200	[thread overview]
Message-ID: <871u9j83j2.fsf@bzg.ath.cx> (raw)
In-Reply-To: <878v3sxeyc.fsf@gmx.li> (Lawrence Mitchell's message of "Mon, 06 May 2013 17:15:07 +0100")

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

Hi Lawrence and all,

Lawrence Mitchell <wence@gmx.li> 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!


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el4.patch --]
[-- Type: text/x-patch, Size: 511 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

  reply	other threads:[~2013-05-07 10:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-27 19:28 Exporting large documents Achim Gratz
2013-04-27 19:35 ` Carsten Dominik
2013-04-29 16:04   ` Lawrence Mitchell
2013-04-29 18:44     ` Achim Gratz
2013-05-01 12:18       ` [PATCH] ox: Cache locations of fuzzy links Lawrence Mitchell
2013-05-01 21:46         ` Nicolas Goaziou
2013-05-02  9:03           ` [PATCH v2] " Lawrence Mitchell
2013-05-02 12:35             ` Nicolas Goaziou
2013-05-02 12:53               ` Nicolas Goaziou
2013-05-03  8:43     ` Exporting large documents Carsten Dominik
2013-05-03 11:12       ` Lawrence Mitchell
     [not found]         ` <877gjfgnl9.fsf@gmail.com>
     [not found]           ` <0F877AB5-D488-4223-B0E7-F11B4B973614@gmail.com>
     [not found]             ` <87ip2xfd0x.fsf@gmail.com>
2013-05-06 11:07               ` Lawrence Mitchell
2013-05-06 16:15                 ` Lawrence Mitchell
2013-05-07 10:26                   ` Bastien [this message]
2013-05-06 18:41                 ` Achim Gratz
2013-05-06 19:17                   ` Nicolas Goaziou
2013-05-06 19:32                     ` Achim Gratz
2013-05-07 14:29                       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871u9j83j2.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=wence@gmx.li \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).