[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] Simple cache mechanism for `org-element-at-point'
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [RFC] Simple cache mechanism for `org-element-at-point' |
Date: |
Sun, 27 Oct 2013 09:52:46 +0100 |
Nicolas Goaziou <address@hidden> writes:
> The following patches introduce a simple cache mechanism for both
> `org-element-at-point' and `org-element-context'. My goal is to make
> them fast enough to be used in most core commands (excepted
> headlines-only commands).
>
> Since a wrong cache can break Org behaviour badly, I would appreciate if
> it could be tested a bit. You can disable cache at any time by setting
> `org-element-use-cache' to nil and reset it with
> `org-element-cache-reset' function.
>
> It may also be interesting to tweak `org-element--cache-sync-idle-time'
> and `org-element--cache-merge-changes-threshold', although I don't
> expect a regular user to do it. Anyway, it may lead to better default
> values.
>
> Since cache is updated upon buffer modification, visibility status
> cannot be cached properly. Since it is also buggy, the first patch
> removes that data altogether.
I applied the first patch.
Here is a slight change to the second one, which will correctly reset
cache when some variables are customized or when a buffer is refreshed
(C-c C-c on a keyword).
Regards,
--
Nicolas Goaziou
0001-org-element-Implement-caching-for-dynamic-parser.patch
Description: Text Data