org-element: Change data structure for cache
commite32ebb6c1ad1455cc34d29cc0881cff84ebde12f
authorNicolas Goaziou <n.goaziou@gmail.com>
Sat, 4 Jan 2014 23:37:37 +0000 (5 00:37 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Sun, 5 Jan 2014 22:08:18 +0000 (5 23:08 +0100)
treed0350767ed41d0a992d4b6d4688cbb44fa9926be
parent594b7808a144289354af67026bb7911bdd2f02fd
org-element: Change data structure for cache

* lisp/org-element.el (org-element-at-point, org-element-cache-get,
  org-element-cache-put, org-element--cache-sync): Complete rewrite to
  use new data structure.
(org-element-context, org-element-cache-reset): Slight change in order
to use new tools to access cached data.
(org-element-cache-merge-changes-threshold): Renamed from
`org-element--cache-merge-changes-threshold'.
(org-element-cache-sync-idle-time): Renamed from
`org-element--cache-sync-idle-time'.
(org-element--cache-objects): New variable.

Now elements are stored in AVL tree and objects in a hash table.  Also
moved functions relative to cache into a specific section of the file.
lisp/org-element.el