forked from mirrors/org-mode
org-element: Raise gc-cons-threshold for org-element-cache-map
This garbage collects many times when calling `org-get-buffer-tags' (such as during tag completion) in a large file with many tags. Raise `gc-cons-threshold' as this may affect other callers in large files. Note that `org-element-parse-buffer' also raises `gc-cons-threshold' as a precedent. This has no effect on most callers and increases performance for extreme cases. * lisp/org-element.el (org-element-cache-map): Raise `gc-cons-threshold'.
This commit is contained in:
parent
579e8c5723
commit
c905565fa8
|
@ -7577,7 +7577,8 @@ the cache."
|
|||
(let ((mk (make-marker)))
|
||||
(set-marker mk to-pos)
|
||||
(setq to-pos mk)))
|
||||
(let (;; Bind variables used inside loop to avoid memory
|
||||
(let ((gc-cons-threshold #x40000000)
|
||||
;; Bind variables used inside loop to avoid memory
|
||||
;; re-allocation on every iteration.
|
||||
;; See https://emacsconf.org/2021/talks/faster/
|
||||
tmpnext-start tmpparent tmpelement)
|
||||
|
|
Loading…
Reference in New Issue