Ihor Radchenko writes: > What if you run M-x org-element-cache-reset after exiting the hang? I did not notice any difference, i.e. still hangs. However, as seen below, I see a lot of seemingly *random* behavior, so please that it with a grain of salt. > Also, if you can get the export finish, can you also share the > profiler report? (M-x profiler-report-write-profile from inside the > profiler report buffer). All right, I did the following 10 experiments. ******************** *** EXPERIMENT 1 *** ******************** CONFIGURATION: (setq-default org-use-extra-keys t) (setq org-export-use-babel nil org-export-with-broken-links 'mark org-cite-csl-styles-dir "~/" org-cite-export-processors '((t csl))) (with-eval-after-load 'ox (require 'oc-csl)) (setq org-element-use-cache nil org-fold-core-style 'overlays) RESULT: HTML exported in 1 minute 46 seconds. NOTES: After the export, 'profiler-report' fails with the error: "Assertion failed: (>= match imatch)" Hence, I ran 'profiler-stop' and then 'profiler-report'. The profile attached to this message as 'export-1.profile'. ******************** *** EXPERIMENT 2 *** ******************** CONFIGURATION: Same as Experiment 1. RESULT: HTML exported in 1 minute 56 seconds. NOTES: The same error with the 'profiler-report' repeats. Used 'profiler-stop'. The profile attached to this message as 'export-2.profile'. ************************************ *** EXPERIMENTS 3, 4, 5, 6, 7, 8 *** ************************************ CONFIGURATION: (setq-default org-use-extra-keys t) (setq org-export-use-babel nil org-export-with-broken-links 'mark org-cite-csl-styles-dir "~/" org-cite-export-processors '((t csl))) (with-eval-after-load 'ox (require 'oc-csl)) ;; This configuration does not include any changes to ;; 'org-element-use-cache' or 'org-fold-core-style'. RESULT: Exporting taking forever. ******************** *** EXPERIMENT 9 *** ******************** CONFIGURATION: The same as Experiments 3-8. RESULT: Exporting crashes Emacs. NOTES: The OS crash log attached to this message as 'crash.txt'. ********************* *** EXPERIMENT 10 *** ********************* CONFIGURATION: The same as Experiment 3-8 and 9. RESULT: HTML exported in 1 minute 31 seconds. NOTES: The profile attached to this message as 'export-3-cache.profile'. Rudy