[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 1de67d0b41 1/2: org-element--cache-sync: Quit early
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 1de67d0b41 1/2: org-element--cache-sync: Quit early when no cache requests are queued |
Date: |
Fri, 16 Sep 2022 00:57:59 -0400 (EDT) |
branch: externals/org
commit 1de67d0b41488d49072ffb5cd9e171fca8fea600
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-element--cache-sync: Quit early when no cache requests are queued
* lisp/org-element.el (org-element--cache-sync): Check
`org-element--cache-sync-requests' value early and quit if there are
none. This reduces the number of conditions checked when the request
queue is empty.
---
lisp/org-element.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 3758d3a1a7..721bc68107 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5953,7 +5953,7 @@ actually submitted."
;; Do not sync when, for example, in the middle of
;; `combine-change-calls'. See the commentary inside
;; `org-element--cache-active-p'.
- (when (org-element--cache-active-p)
+ (when (and org-element--cache-sync-requests
(org-element--cache-active-p))
;; Check if the buffer have been changed outside visibility of
;; `org-element--cache-before-change' and
`org-element--cache-after-change'.
(if (/= org-element--cache-last-buffer-size (buffer-size))