[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 85712d6 25/29: Add comments documenting cache diagn
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 85712d6 25/29: Add comments documenting cache diagnostics |
Date: |
Sun, 17 Oct 2021 02:57:30 -0400 (EDT) |
branch: externals/org
commit 85712d6456e7de1daa0e9d1d2203b445ee08c798
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
Add comments documenting cache diagnostics
---
lisp/org-element.el | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 69baf0f..bcf5c62 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5182,17 +5182,20 @@ indentation removed from its contents."
;;; Cache
;;
-;; Implement a caching mechanism for `org-element-at-point' and
-;; `org-element-context', which see.
+;; Implement a caching mechanism for `org-element-at-point',
`org-element-context', and for
+;; fast mapping across Org elements in `org-element-cache-map', which see.
;;
-;; A single public function is provided: `org-element-cache-reset'.
+;; When cache is enabled, the elements returned by `org-element-at-point' and
+;; `org-element-context' are returned by reference. Altering these elements
will
+;; also alter their cache representation. The same is true for
+;; elements passed to mapping function in `org-element-cache-map'.
;;
-;; Cache is disabled by default for now because it sometimes triggers
-;; freezes, but it can be enabled globally with
-;; `org-element-use-cache'. `org-element-cache-sync-idle-time',
-;; `org-element-cache-sync-duration' and
-;; `org-element-cache-sync-break' can be tweaked to control caching
-;; behavior.
+;; Public functions are: `org-element-cache-reset',
`org-element-cache-refresh', and
+;; `org-element-cache-map'.
+;;
+;; Cache can be controlled using `org-element-use-cache' and
`org-element-cache-persistent'.
+;; `org-element-cache-sync-idle-time', `org-element-cache-sync-duration' and
+;; `org-element-cache-sync-break' can be tweaked to control caching behavior.
;;
;; Internally, parsed elements are stored in an AVL tree,
;; `org-element--cache'. This tree is updated lazily: whenever
@@ -5224,7 +5227,14 @@ indentation removed from its contents."
;; associated to a key, obtained with `org-element--cache-key'. This
;; mechanism is robust enough to preserve total order among elements
;; even when the tree is only partially synchronized.
-
+;;
+;; The cache code debuggin is fairly complex because cache request
+;; state is often hard to reproduce. An extensive diagnostics
+;; functionality is built into the cache code to assist hunting bugs.
+;; See `org-element--cache-self-verify',
`org-element--cache-self-verify-frequency',
+;; `org-element--cache-diagnostics', `org-element--cache-diagnostics-level',
+;; `org-element--cache-diagnostics-ring-size',
`org-element--cache-map-statistics',
+;; `org-element--cache-map-statistics-threshold'.
(defvar org-element-use-cache t
"Non-nil when Org parser should cache its results.")
- [elpa] externals/org fe6cefd 16/29: ox.el: Support cache during export, (continued)
- [elpa] externals/org fe6cefd 16/29: ox.el: Support cache during export, ELPA Syncer, 2021/10/17
- [elpa] externals/org 60c927f 17/29: Add new element parser and cache tests, ELPA Syncer, 2021/10/17
- [elpa] externals/org 3c4290e 21/29: org.el/org-scan-tags: Make use of fast `org-element-cache-map', ELPA Syncer, 2021/10/17
- [elpa] externals/org 004ac14 28/29: Fix compatibility with Emacs 26, ELPA Syncer, 2021/10/17
- [elpa] externals/org d437817 11/29: org.el/org-goto-first-child: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 399a29c 13/29: org.el/org-up-heading-safe: Add cache support, ELPA Syncer, 2021/10/17
- [elpa] externals/org 86345df 14/29: org.el/org-in-commented-heading-p: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 5aeeb4f 19/29: Use `org-element-at-point-no-context' in performance-critical places, ELPA Syncer, 2021/10/17
- [elpa] externals/org e70a8aa 18/29: Use org-element-cache in place of text property cache in agenda, ELPA Syncer, 2021/10/17
- [elpa] externals/org 885808f 22/29: Fix incorrectly written test, ELPA Syncer, 2021/10/17
- [elpa] externals/org 85712d6 25/29: Add comments documenting cache diagnostics,
ELPA Syncer <=
- [elpa] externals/org abe7222 23/29: Add declares to suppress compiler warnings, ELPA Syncer, 2021/10/17