Attached patch, I think it's self-explanatory so the commit message is reproduced here: 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.