From mboxrd@z Thu Jan  1 00:00:00 1970
From: Nicolas Goaziou <n.goaziou@gmail.com>
Subject: Re: [RFC] Org version of the Org manual
Date: Wed, 06 Mar 2013 09:40:20 +0100
Message-ID: <87vc942a6j.fsf@gmail.com>
References: <m1bob8cffh.fsf@tsdye.com> <87ehfuonx6.fsf@Rainer.invalid>
	<m16215cj8x.fsf@tsdye.com> <87zjyhotvi.fsf@yagnesh.org>
	<8738w90wmq.fsf@Rainer.invalid> <87r4jt53ts.fsf@bzg.ath.cx>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([208.118.235.92]:45631)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <n.goaziou@gmail.com>) id 1UD9tq-0002TE-KE
	for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 03:40:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <n.goaziou@gmail.com>) id 1UD9tp-0004sq-Fx
	for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 03:40:34 -0500
Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:36234)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <n.goaziou@gmail.com>) id 1UD9tp-0004sg-8y
	for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 03:40:33 -0500
Received: by mail-wi0-f178.google.com with SMTP id hq4so221006wib.5
	for <emacs-orgmode@gnu.org>; Wed, 06 Mar 2013 00:40:32 -0800 (PST)
In-Reply-To: <87r4jt53ts.fsf@bzg.ath.cx> (Bastien's message of "Wed, 06 Mar
	2013 09:29:19 +0100")
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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: Bastien <bzg@altern.org>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-orgmode@gnu.org

Hello,

Bastien <bzg@altern.org> writes:

> Hi Achim,
>
> thanks for doing the profiling.
>
> Achim Gratz <Stromeko@nexgo.de> writes:
>
>> org-macro-replace-all    2    222.371024    111.185512
>
> This one looks suspicious: if the function does what it says,
> why does it run twice?  If we can spare 111 secs here, that's
> already an improvement.  I'll have a look at some point but
> feel free to beat me on this!

It has to be run twice. See comments in `org-export-as':

  Expand export-specific set of macros: {{{author}}},
  {{{date}}}, {{{email}}} and {{{title}}}.  It must be done
  once regular macros have been expanded, since document
  keywords may contain one of them.

IOW it handles macros in #+TITLE and other document keywords. I don't
think the second run is as long as the first one, though.


Regards,

-- 
Nicolas Goaziou