all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: [ANN] Lazy cache synchronization
Date: Thu, 20 Feb 2014 23:08:04 +0100	[thread overview]
Message-ID: <87ppmh1lq3.fsf@gmail.com> (raw)

Hello,

I just pushed an update for parser cache.

Until then, synchronization was the weak spot of the cache mechanism, as
it happened in one row after each buffer change, with a linear
complexity by the number of elements in cache after point. In other
words, editing a very large buffer near its end was fast, but slow at
its beginning.

Now, synchronization happens lazily, which means the cache is only
updated when and where needed, or during idle time. Therefore the cache
mechanism scales a lot better.

Obviously, the more functions use it, the more it is profitable. Hence,
it would be nice to rewrite core functions so they use the parser (i.e,
`org-element-at-point' and `org-element-context'). For example,
functions like `org-in-clocktable-p', `org-in-commented-line',
`org-in-indented-comment-line' (which should be merged with the previous
one) or `org-in-verbatim-emphasis' are good starting points.

If you feel adventurous, synchronization can be controlled with the
following variables:

  - `org-element-cache-sync-idle-time'
  - `org-element-cache-sync-duration'
  - `org-element-cache-sync-break'

Feedback (or benchmarks) welcome.


Regards,

-- 
Nicolas Goaziou

             reply	other threads:[~2014-02-20 22:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 22:08 Nicolas Goaziou [this message]
2014-02-26 13:33 ` [ANN] Lazy cache synchronization Michael Brand
2014-02-26 13:58   ` Nicolas Goaziou
2014-02-26 14:07     ` Michael Brand
2014-02-26 13:49 ` Nicolas Richard
2014-02-26 15:59   ` Bastien
2014-02-27  4:25   ` Daniel Clemente
2014-02-27  8:05     ` Andreas Leha

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=87ppmh1lq3.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --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.