emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [ANN] Lazy cache synchronization
@ 2014-02-20 22:08 Nicolas Goaziou
  2014-02-26 13:33 ` Michael Brand
  2014-02-26 13:49 ` Nicolas Richard
  0 siblings, 2 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2014-02-20 22:08 UTC (permalink / raw)
  To: Org Mode List

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-27  8:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20 22:08 [ANN] Lazy cache synchronization Nicolas Goaziou
2014-02-26 13:33 ` 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

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).