all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: Exporting large documents
Date: Mon, 06 May 2013 21:32:26 +0200	[thread overview]
Message-ID: <87ip2vvr91.fsf@Rainer.invalid> (raw)
In-Reply-To: 87haifex41.fsf@gmail.com

Nicolas Goaziou writes:
> Actually this is a bit different. Parsing doesn't backtrack. Look at
> `org-element-parse-buffer' through elp to see that elements are parsed
> only once.

Sorry for the loose terminology.

> The problem comes from `org-element-at-point'. To be effective, it needs
> to move back to the current headline, and start parsing buffer again
> from there. That means the first element after the headline (often
> a property drawer) will be parsed each time we need information within
> the section.

What I was suggesting is that we might mark those elements that were
already successfully parsed so that org-element-at-point can just pick
up the markings and only parse again when there are none.  Best have
them in the buffer as properties and remove them when an edit is done.

> A very good improvement for the exporter and, more importantly, for the
> parser, would be to cache results from `org-element--current-element'.
> Though, this cache would also need to be refreshed after each buffer
> modification. This is the tricky part.

For the exporter we know that the buffer isn't changing, or is it?

> One solution would be to use `after-change-functions' and
> `before-change-functions' to store intervals of modified areas in the
> buffer. Then, during idle time, a `maphash' could update boundaries of
> cached values or remove them completely, according to the intervals.

I'd prefer to store this in the buffer, based on no data or experience…
:-)


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

  reply	other threads:[~2013-05-06 19:32 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
2013-05-06 18:41                 ` Achim Gratz
2013-05-06 19:17                   ` Nicolas Goaziou
2013-05-06 19:32                     ` Achim Gratz [this message]
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

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

  git send-email \
    --in-reply-to=87ip2vvr91.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.