forked from mirrors/org-mode
org-element-parse-buffer: Avoid excessive garbage collection
* lisp/org-element.el (org-element-parse-buffer): Increase `gc-cons-threshold' to improve performance. In my tests on large Org buffers, garbage collection took 50% of the time without increasing the threshold.
This commit is contained in:
parent
08e595f312
commit
20ed794b92
|
@ -4478,7 +4478,8 @@ or objects within the parse tree.
|
|||
This function assumes that current major mode is `org-mode'."
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((org-data (org-element-org-data-parser)))
|
||||
(let ((org-data (org-element-org-data-parser))
|
||||
(gc-cons-threshold #x40000000))
|
||||
(org-skip-whitespace)
|
||||
(org-element--parse-elements
|
||||
(point-at-bol) (point-max)
|
||||
|
|
Loading…
Reference in New Issue