forked from mirrors/org-mode
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.
This commit is contained in:
parent
6d8d7fba61
commit
1de67d0b41
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue