* Flyspell causes severe slowdown when manipulating footnotes
@ 2022-12-06 1:34 arozbiz
2022-12-07 13:23 ` Ihor Radchenko
0 siblings, 1 reply; 13+ messages in thread
From: arozbiz @ 2022-12-06 1:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
I just upgraded to Org 9.6 and I've noticed that having flyspell-mode
turned on causes very large slowdowns when adding or deleting footnotes in
an org file with lots of footnotes (e.g., more than 200, which is common
for the academic articles that I use org for). Any ideas for what might be
causing this?
Alan
[-- Attachment #2: Type: text/html, Size: 364 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-06 1:34 Flyspell causes severe slowdown when manipulating footnotes arozbiz
@ 2022-12-07 13:23 ` Ihor Radchenko
2022-12-08 14:12 ` arozbiz
0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2022-12-07 13:23 UTC (permalink / raw)
To: arozbiz; +Cc: emacs-orgmode
arozbiz@gmail.com writes:
> I just upgraded to Org 9.6 and I've noticed that having flyspell-mode
> turned on causes very large slowdowns when adding or deleting footnotes in
> an org file with lots of footnotes (e.g., more than 200, which is common
> for the academic articles that I use org for). Any ideas for what might be
> causing this?
Most likely cache updates.
Could you please (1) Set org-element--cache-self-verify to nil and see
if things get back to normal; (2) If things are still slow after setting
the variable, please run M-x profiler-start ... M-x profiler-report and
share the data. See https://orgmode.org/list/87ee2nlslt.fsf@localhost.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-07 13:23 ` Ihor Radchenko
@ 2022-12-08 14:12 ` arozbiz
2022-12-10 10:24 ` Ihor Radchenko
0 siblings, 1 reply; 13+ messages in thread
From: arozbiz @ 2022-12-08 14:12 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1131 bytes --]
Thanks Ihor for the response. Unfortunately, setting
org-element--cache-self-verify to nil didn't work. Profile report attached.
On Wed, Dec 7, 2022 at 7:23 AM Ihor Radchenko <yantar92@posteo.net> wrote:
> arozbiz@gmail.com writes:
>
> > I just upgraded to Org 9.6 and I've noticed that having flyspell-mode
> > turned on causes very large slowdowns when adding or deleting footnotes
> in
> > an org file with lots of footnotes (e.g., more than 200, which is common
> > for the academic articles that I use org for). Any ideas for what might
> be
> > causing this?
>
> Most likely cache updates.
> Could you please (1) Set org-element--cache-self-verify to nil and see
> if things get back to normal; (2) If things are still slow after setting
> the variable, please run M-x profiler-start ... M-x profiler-report and
> share the data. See https://orgmode.org/list/87ee2nlslt.fsf@localhost.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>
[-- Attachment #1.2: Type: text/html, Size: 1885 bytes --]
[-- Attachment #2: report.txt --]
[-- Type: text/plain, Size: 35165 bytes --]
[profiler-profile "28.1" cpu #s(hash-table size 217 test equal rehash-size 1.5 rehash-threshold 0.8125 data ([nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 37 [if "#<lambda -0x19ad6663066456e7>" funcall let wc-count let* wc-mode-update setq progn if when "#<lambda 0x1bdc28c2>" apply timer-event-handler nil nil] 131 ["#<lambda -0x18d408a6f5b3e57b>" funcall let wc-count let* wc-mode-update setq progn if when "#<lambda 0x1bdc28c2>" apply timer-event-handler nil nil nil] 3 ["#<compiled 0x12a1613af0fd8d24>" nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 3 [file-truename file-truename file-truename file-truename org-roam-descendant-of-p org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar-tabs tab-bar--current-tab-index doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\) nil] 3 [file-truename file-truename org-roam-descendant-of-p org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar-tabs tab-bar--current-tab-find tab-bar--current-tab doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\) nil nil] 4 [file-relative-name org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar-tabs tab-bar--current-tab-index doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\) nil nil nil nil nil] 3 [doom-modeline-format--main eval redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil] 5 [org-roam-descendant-of-p org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar--current-tab-make tab-bar--current-tab doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\) nil nil nil nil nil] 3 [org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar--current-tab-make tab-bar--current-tab doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 3 [org-roam-descendant-of-p org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar-tabs tab-bar--current-tab-index doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\) nil nil nil nil nil] 3 [org-roam-descendant-of-p org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar-tabs tab-bar--current-tab-find tab-bar--current-tab doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\) nil nil nil nil] 3 ["#<compiled 0xb5bcb5268124f>" org-element--parse-to org-element-at-point org-element-context org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 4 [org-element-entity-parser org-element--object-lex org-element-context org-footnote-all-labels org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 4 [org-element-context org-footnote-all-labels org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 54 [org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 3 [rx--every rx--translate-or rx--translate-form rx--translate rx--translate-seq rx--translate-form rx--translate rx-to-string org-element--parse-generic-emphasis org-element-italic-parser org-element--object-lex org-element-context org-footnote-all-labels org-footnote-new org-footnote-action funcall-interactively] 3 [org-element-at-point org-element-context org-footnote-all-labels org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 6 [org-element-footnote-reference-parser org-element--object-lex org-element-context org-footnote-all-labels org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [font-lock-extend-jit-lock-region-after-change jit-lock-after-change org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 4 [org-element--cache-compare avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree-delete org-element--cache-process-request org-element--cache-sync org-element-at-point org-element-context org-babel-get-src-block-info] 3 [substitute-command-keys org-mark-ring-push org-footnote-goto-definition org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 3 [org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 10 [org-element-context org-footnote--collect-references org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 26 [org-fold--reveal-drawer-or-block-maybe org-fold-core--fix-folded-region org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 4 [org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 25 [org-element--parse-to org-element--cache-process-request org-element--cache-sync org-element--cache-submit-request org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil] 3 [org-fold-core--fix-folded-region org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 37 [org-element--cache-submit-request org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 7 [org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 6 [org-element--cache-process-request org-element--cache-sync org-element--cache-submit-request org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 12 [org-fold-core-next-folding-state-change org-fold-core--fix-folded-region org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 3 [org-element--cache-find org-element--cache-submit-request org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil] 4 [org-element--cache-compare avl-tree--do-delete avl-tree--do-delete avl-tree--do-delete avl-tree-delete org-element--cache-process-request org-element--cache-sync org-element--cache-submit-request org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute] 3 [org-element--cache-find org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 3 [org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote--set-label org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil] 6 [org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 28 [org-fold-core--fix-folded-region org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 41 [org-element--cache-after-change org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 4 [org-fold-core-get-folding-spec org-fold-core--fix-folded-region org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [org-fontify-extend-region font-lock-extend-jit-lock-region-after-change jit-lock-after-change org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 3 [org-fold-core--property-symbol-get-create org-fold-core-get-region-at-point org-fold-core--fix-folded-region org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 3 [org-fold-core-get-folding-spec-from-alias org-fold-core-get-folding-spec org-fold-core--fix-folded-region org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 4 [internal--syntax-propertize back-to-indentation org-fontify-extend-region font-lock-extend-jit-lock-region-after-change jit-lock-after-change org-footnote-renumber-fn:N org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 3 [org-element-context org-footnote--collect-references org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 26 [org-element-property org-footnote--collect-references org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 4 [org-element--parse-generic-emphasis org-element-italic-parser org-element--object-lex org-element-context org-footnote--collect-references org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 3 [org-element--object-lex org-element-context org-footnote--collect-references org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 4 [org-element--parse-to org-element-at-point org-element-context org-footnote--collect-references org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil] 3 [org-element--current-element org-element--parse-to org-element-at-point org-element-context org-footnote--collect-references org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 3 [org-fold-core--fix-folded-region org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 16 [org-element-section-parser org-element--current-element org-element--parse-to org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 38 [org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil] 31 [org-element--parse-to org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 10 [org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 66 [org-element-footnote-definition-parser org-element--current-element org-element--parse-to org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 3 [org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 6 [org-element--parse-objects org-element-headline-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil] 11 [org-element-headline-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 3 [rx--bracket rx--atomic-regexp rx-to-string org-element-headline-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil] 4 [org-element--cache-compare avl-tree--do-enter avl-tree--do-enter avl-tree--do-enter avl-tree-enter org-element--cache-put org-element--parse-to org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil] 3 [org-element--cache-submit-request org-element--cache-after-change org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 4 [org-element--cache-after-change org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [org-element--current-element org-element--parse-to org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil] 3 [org-element--cache-process-request org-element--cache-sync org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil] 9 [org-element--cache-sync org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 4 [org-element-at-point org-footnote--collect-definitions org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [org-element-org-data-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote--clear-footnote-section org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 6 [org-element-org-data-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil] 444 [org-fold-core--fix-folded-region org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 62 [org-element--cache-before-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 3 [org-element--cache-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 9 [org-fontify-extend-region font-lock-extend-jit-lock-region-after-change jit-lock-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 4 [org-fold-core-get-folding-spec-from-alias org-fold-core-get-folding-spec org-fold-core--fix-folded-region org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 3 [org-fold-core-region-folded-p org-fold-core--fix-folded-region org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 6 [org-element--get-global-node-properties org-element-org-data-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 6 [org-fold-core-get-folding-spec org-fold-core--fix-folded-region org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 4 [file-name-sans-extension org-element-org-data-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil] 4 [org-fold-core-get-region-at-point org-fold-core--fix-folded-region org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [timer-set-idle-time run-with-idle-timer org-element--cache-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil nil nil nil] 3 [syntax-propertize internal--syntax-propertize back-to-indentation org-fontify-extend-region font-lock-extend-jit-lock-region-after-change jit-lock-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil nil] 3 ["#<compiled 0x9c35de726459a8>" syntax-propertize internal--syntax-propertize back-to-indentation org-fontify-extend-region font-lock-extend-jit-lock-region-after-change jit-lock-after-change org-footnote-sort org-footnote-auto-adjust-maybe org-footnote-new org-footnote-action funcall-interactively command-execute nil nil nil] 3 [org-element--current-element org-element--parse-to org-element-at-point org-element-context org-appear--current-elem org-appear--post-cmd nil nil nil nil nil nil nil nil nil nil] 3 [org-element--current-element org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil] 1157 [org-element--current-element org-element--parse-to org-element-at-point org-back-to-heading org-back-to-heading-or-point-min org-get-property-block org--property-local-values org-entry-get-with-inheritance org-entry-get org-log-into-drawer org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil] 7 [org-element--cache-compare avl-tree--do-enter avl-tree--do-enter avl-tree--do-enter avl-tree--do-enter avl-tree--do-enter avl-tree--do-enter avl-tree--do-enter avl-tree-enter org-element--cache-put org-element--parse-to org-element-at-point org-back-to-heading org-back-to-heading-or-point-min org-get-property-block org--property-local-values] 4 [org-element-footnote-definition-parser org-element--current-element org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil] 77 [org-back-to-heading-or-point-min org-get-property-block org--property-local-values org-entry-get-with-inheritance org-entry-get org-log-into-drawer org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil] 62 [org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil nil] 616 [org-element-section-parser org-element--current-element org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil] 118 [rx--translate-any rx--translate-form rx--translate rx--translate-or rx--translate-form rx--translate rx--translate-seq rx--translate-form rx--translate rx-to-string org-element--parse-generic-emphasis org-element-underline-parser org-element--object-lex org-element-context org--flyspell-object-check-p org-mode-flyspell-verify] 7 [rx--parse-any rx--translate-any rx--translate-form rx--translate rx--translate-or rx--translate-form rx--translate rx--translate-seq rx--translate-form rx--translate rx-to-string org-element--parse-generic-emphasis org-element-underline-parser org-element--object-lex org-element-context org--flyspell-object-check-p] 3 [rx--translate-form rx--translate rx--translate-seq rx--translate-form rx--translate rx-to-string org-element--parse-generic-emphasis org-element-italic-parser org-element--object-lex org-element-context org--flyspell-object-check-p org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil] 3 [flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 38 [org-at-heading-p org-back-to-heading org-back-to-heading-or-point-min org-get-property-block org--property-local-values org-entry-get-with-inheritance org-entry-get org-log-into-drawer org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil] 3 [org-element--cache-put org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil] 10 [org-element-entity-parser org-element--object-lex org-element-context org--flyspell-object-check-p org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil] 6 [org-element-headline-parser org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil] 12 [org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil nil nil] 34 [rx--bracket rx--atomic-regexp rx-to-string org-element-headline-parser org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil] 3 [org-element-paragraph-parser org-element--current-element org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil] 3 [org-get-limited-outline-regexp org-element--current-element org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil] 4 [derived-mode-p org-get-limited-outline-regexp org-element--current-element org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil] 4 [org-element-context org--flyspell-object-check-p org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil nil nil] 24 [rx--translate-group rx--translate-form rx--translate rx--translate-seq rx--translate-form rx--translate rx-to-string org-element--parse-generic-emphasis org-element-italic-parser org-element--object-lex org-element-context org--flyspell-object-check-p org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil] 3 [rx--translate-any rx--translate-form rx--translate "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_252>" mapcan rx--translate-or rx--translate-form rx--translate rx--translate-seq rx--translate-form rx--translate rx-to-string org-element--parse-generic-emphasis org-element-italic-parser org-element--object-lex org-element-context] 3 [replace-regexp-in-string org-element-headline-parser org-element--parse-to org-element-at-point org-element-at-point-no-context org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil] 4 [org-element-underline-parser org-element--object-lex org-element-context org--flyspell-object-check-p org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil nil nil nil] 3 [org-before-first-heading-p org-back-to-heading-or-point-min org-get-property-block org--property-local-values org-entry-get-with-inheritance org-entry-get org-log-into-drawer org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil] 7 [org-back-to-heading org-back-to-heading-or-point-min org-get-property-block org--property-local-values org-entry-get-with-inheritance org-entry-get org-log-into-drawer org-mode-flyspell-verify flyspell-word flyspell-post-command-hook nil nil nil nil nil nil] 3 [doom-modeline-icon doom-modeline-segment--time eval format-mode-line doom-modeline-format--main eval redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil] 3 [org-in-regexp org-in-verbatim-emphasis org-footnote-in-valid-context-p org-footnote-next-reference-or-definition org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1562910c9d2d8703>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 4 [org-footnote-next-reference-or-definition org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x156298ff43a83703>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 3 [yascroll:make-thumb-overlays yascroll:show-scroll-bar-internal yascroll:show-scroll-bar yascroll:safe-show-scroll-bar yascroll:after-window-scroll redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil] 4 [if let while let let wc-format-modeline-string let wc-generate-modeline let* wc-mode-update setq progn if when "#<lambda 0x1bdc28c2>" apply] 4 [syntax-ppss show-paren--default show-paren-function apply timer-event-handler nil nil nil nil nil nil nil nil nil nil nil] 10 [file-truename file-truename file-truename file-truename file-truename org-roam-descendant-of-p org-roam-file-p org-roam-buffer-p if let azr/tab-bar-tab-name-current tab-bar-tabs tab-bar--current-tab-index doom-modeline-segment--workspace-name eval redisplay_internal\ \(C\ function\)] 3 [counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil nil] 29 [ivy--reset-state "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 12 ["#<compiled 0x116411fe5fcf76e7>" all-completions ivy--reset-state "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil] 11 [all-completions ivy--reset-state "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 ["#<subr ivy-prescient-sort-function>" sort ivy--reset-state "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil] 20 ["#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 8 ["#<compiled 0x13d24e91da08977b>" mapcar easy-menu-get-map easy-menu-add-item easy-menu-change org-install-agenda-files-menu org-mode yankpad--file-elements yankpad--categories yankpad-local-category-to-major-mode run-hooks run-mode-hooks minibuffer-inactive-mode read-from-minibuffer "#<subr ivy-read>" apply] 4 [ivy-rich-format-column "#<compiled -0x1c95333557557b5a>" ivy-rich-format ivy-rich--counsel-M-x-transformer ivy--format ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil] 12 [read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 67 ["#<compiled 0x1cf6e70892d94720>" cl-delete cl-remove ivy--re-filter ivy--filter ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil] 234 [cl-remove ivy--re-filter ivy--filter ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil] 16 [cl--position cl-position ivy--recompute-index ivy--filter ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil] 4 [documentation ivy-rich-counsel-function-docstring ivy-rich-format-column "#<compiled -0x1c2bf6ae87d1ef89>" ivy-rich-format ivy-rich--counsel-M-x-transformer ivy--format ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively] 15 ["#<compiled 0x110d11bf6e7e1dc9>" ivy--format-minibuffer-line "#<compiled 0x4d6af82acb26e01>" mapcar ivy--wnd-cands-to-str ivy--format ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute] 10 [key-chord-lookup-key key-chord-input-method read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil nil nil] 3 [cl-delete cl-remove ivy--re-filter ivy--filter ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil] 20 [ivy-rich-counsel-function-docstring ivy-rich-format-column "#<compiled -0x1c9501fc49641b5a>" ivy-rich-format ivy-rich--counsel-M-x-transformer ivy--format ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute] 4 [ivy-format-function-default ivy--wnd-cands-to-str ivy--format ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil] 3 ["#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_9>" ivy-prescient-re-builder ivy--filter ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil] 3 [ivy--re-filter ivy--filter ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil] 1 ["#<compiled 0x4d6af82acb26e01>" mapcar ivy--wnd-cands-to-str ivy--format ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil] 3 ["#<compiled 0xe038af2db688220>" prescient-initials-regexp "#<compiled -0xd3a0ee15209d4b3>" mapcar "#<compiled 0xc9c7da72640b9ab>" prescient-filter-regexps ivy-prescient-re-builder ivy-set-text ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively] 4 ["#<compiled -0x1c8ce28d9dc98a33>" substitute-command-keys documentation ivy-rich-counsel-function-docstring ivy-rich-format-column "#<compiled 0xa595a4799184446>" ivy-rich-format ivy-rich--counsel-M-x-transformer ivy--format ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read] 3 ["#<compiled -0x6168eee8b10d129>" cl-remove ivy--re-filter ivy--filter ivy--update-minibuffer ivy--exhibit ivy--queue-exhibit read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil] 2 [easy-menu-get-map easy-menu-add-item easy-menu-change org-install-agenda-files-menu org-mode yankpad--file-elements yankpad--categories yankpad-local-category-to-major-mode run-hooks run-mode-hooks minibuffer-inactive-mode read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x] 5 [yankpad--categories yankpad-local-category-to-major-mode run-hooks run-mode-hooks minibuffer-inactive-mode read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil] 3 [org-element--current-element org-element--parse-elements org-element--parse-elements org-element--parse-elements org-element-parse-buffer yankpad--file-elements yankpad--categories yankpad-local-category-to-major-mode run-hooks run-mode-hooks minibuffer-inactive-mode read-from-minibuffer "#<subr ivy-read>" apply ivy-read counsel-M-x] 3 [funcall-interactively command-execute counsel-M-x-action "#<compiled -0x18f9513b23fbfb80>" ivy-call "#<subr ivy-read>" apply ivy-read counsel-M-x funcall-interactively command-execute nil nil nil nil nil] 7 [Automatic\ GC] 437)) (25489 60701 873247 126000) nil]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-08 14:12 ` arozbiz
@ 2022-12-10 10:24 ` Ihor Radchenko
2022-12-10 23:43 ` Rudolf Adamkovič
2022-12-11 22:58 ` Flyspell causes severe slowdown when manipulating footnotes arozbiz
0 siblings, 2 replies; 13+ messages in thread
From: Ihor Radchenko @ 2022-12-10 10:24 UTC (permalink / raw)
To: arozbiz; +Cc: emacs-orgmode
arozbiz@gmail.com writes:
> Thanks Ihor for the response. Unfortunately, setting
> org-element--cache-self-verify to nil didn't work. Profile report attached.
Thanks!
I just pushed a slight optimization to the footnote sorting code.
Can you try again using the latest main?
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=169333e1c
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-10 10:24 ` Ihor Radchenko
@ 2022-12-10 23:43 ` Rudolf Adamkovič
2022-12-11 9:28 ` Flyspell process called frequently when using Org export (was: Flyspell causes severe slowdown when manipulating footnotes) Ihor Radchenko
2022-12-11 22:58 ` Flyspell causes severe slowdown when manipulating footnotes arozbiz
1 sibling, 1 reply; 13+ messages in thread
From: Rudolf Adamkovič @ 2022-12-10 23:43 UTC (permalink / raw)
To: Ihor Radchenko, arozbiz; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> I just pushed a slight optimization to the footnote sorting code.
Unrelated to the footnotes mentioned above, but I noticed that Org
starts and kills Ispell all the time. I see the following messages
repeated over and over when working with Org:
Starting new Ispell process aspell with american dictionary...done
...
Ispell process killed
For the sake of experiment, I have just tried to export (to HTML) a
subtree that contains nothing in it but a single BibTeX source block.
Sure enough, Org started and killed a new Ispell process!
P.S. I use Flyspell with the following (standard) configuration:
(add-hook 'after-init-hook
(lambda ()
(add-hook 'text-mode-hook #'flyspell-mode)
(add-hook 'prog-mode-hook #'flyspell-prog-mode)))
Rudy
--
"Strange as it may sound, the power of mathematics rests on its evasion
of all unnecessary thought and on its wonderful saving of mental
operations."
-- Ernst Mach, 1838-1916
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
^ permalink raw reply [flat|nested] 13+ messages in thread
* Flyspell process called frequently when using Org export (was: Flyspell causes severe slowdown when manipulating footnotes)
2022-12-10 23:43 ` Rudolf Adamkovič
@ 2022-12-11 9:28 ` Ihor Radchenko
2022-12-11 15:54 ` Rudolf Adamkovič
0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2022-12-11 9:28 UTC (permalink / raw)
To: Rudolf Adamkovič; +Cc: arozbiz, emacs-orgmode
Rudolf Adamkovič <salutis@me.com> writes:
> Unrelated to the footnotes mentioned above
Note how I change the email subject to mark a new topic.
In Emacs, it is M-x message-change-subject
> ... , but I noticed that Org
> starts and kills Ispell all the time. I see the following messages
> repeated over and over when working with Org:
>
> Starting new Ispell process aspell with american dictionary...done
> ...
> Ispell process killed
>
> For the sake of experiment, I have just tried to export (to HTML) a
> subtree that contains nothing in it but a single BibTeX source block.
> Sure enough, Org started and killed a new Ispell process!
>
> P.S. I use Flyspell with the following (standard) configuration:
>
> (add-hook 'after-init-hook
> (lambda ()
> (add-hook 'text-mode-hook #'flyspell-mode)
> (add-hook 'prog-mode-hook #'flyspell-prog-mode)))
I am unable to reproduce using the latest Org.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell process called frequently when using Org export (was: Flyspell causes severe slowdown when manipulating footnotes)
2022-12-11 9:28 ` Flyspell process called frequently when using Org export (was: Flyspell causes severe slowdown when manipulating footnotes) Ihor Radchenko
@ 2022-12-11 15:54 ` Rudolf Adamkovič
2022-12-12 9:30 ` Ihor Radchenko
0 siblings, 1 reply; 13+ messages in thread
From: Rudolf Adamkovič @ 2022-12-11 15:54 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: arozbiz, emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> Rudolf Adamkovič <salutis@me.com> writes:
>
>> Unrelated to the footnotes mentioned above
>
> Note how I change the email subject to mark a new topic.
> In Emacs, it is M-x message-change-subject
TIL! Thank you.
> I am unable to reproduce using the latest Org.
I apologize for not providing a sequence of reproduction steps.
Upon further investigation, Org frequently starts and kills the
spellchecker when the document contains `LocalWords' comments.
1. Start Emacs
emacs -Q
2. Configure Flyspell
(add-hook 'text-mode-hook #'flyspell-mode)
(add-hook 'prog-mode-hook #'flyspell-prog-mode)
3. Create a new Org file
# LocalWords: xyz
Hello there!
4. Export the file to HTML
Expected:
No Ispell process started on export.
Actual:
A new Ispell process started on export.
P.S. I also see Org starting Ispell over and over when holding down
`C-v' in a long document that contains lots of scattered `LocalWords'
comments.
Rudy
--
"The whole science is nothing more than a refinement of everyday
thinking."
-- Albert Einstein, 1879-1955
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-10 10:24 ` Ihor Radchenko
2022-12-10 23:43 ` Rudolf Adamkovič
@ 2022-12-11 22:58 ` arozbiz
2022-12-12 9:32 ` Ihor Radchenko
1 sibling, 1 reply; 13+ messages in thread
From: arozbiz @ 2022-12-11 22:58 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]
Thanks. It definitely helps, but it's still quite slow. What's made the
biggest difference is is advising the relevant functions to turn flyspell
off beforehand and then turn it back on.
```
(defun azr/org-footnote-disable-flyspell (orig-fun &rest args)
(flyspell-mode -1)
(apply orig-fun args)
(flyspell-mode))
(advice-add 'org-footnote-new :around #'azr/org-footnote-disable-flyspell)
(advice-add 'org-footnote-delete :around
#'azr/org-footnote-disable-flyspell)
```
Best,
Alan
On Sat, Dec 10, 2022 at 4:24 AM Ihor Radchenko <yantar92@posteo.net> wrote:
> arozbiz@gmail.com writes:
>
> > Thanks Ihor for the response. Unfortunately, setting
> > org-element--cache-self-verify to nil didn't work. Profile report
> attached.
>
> Thanks!
> I just pushed a slight optimization to the footnote sorting code.
> Can you try again using the latest main?
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=169333e1c
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>
[-- Attachment #2: Type: text/html, Size: 2059 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell process called frequently when using Org export (was: Flyspell causes severe slowdown when manipulating footnotes)
2022-12-11 15:54 ` Rudolf Adamkovič
@ 2022-12-12 9:30 ` Ihor Radchenko
2024-05-11 10:06 ` Ihor Radchenko
0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2022-12-12 9:30 UTC (permalink / raw)
To: Rudolf Adamkovič; +Cc: arozbiz, emacs-orgmode
Rudolf Adamkovič <salutis@me.com> writes:
> Upon further investigation, Org frequently starts and kills the
> spellchecker when the document contains `LocalWords' comments.
>
> 1. Start Emacs
>
> emacs -Q
>
> 2. Configure Flyspell
>
> (add-hook 'text-mode-hook #'flyspell-mode)
> (add-hook 'prog-mode-hook #'flyspell-prog-mode)
>
> 3. Create a new Org file
>
> # LocalWords: xyz
>
> Hello there!
>
> 4. Export the file to HTML
>
> Expected:
>
> No Ispell process started on export.
>
> Actual:
>
> A new Ispell process started on export.
Confirmed.
This is because `org-html-final-function' uses `mhtml-mode' to indent the
resulting html file. `mhtml-mode' unconditionally runs `prog-mode-hook'
thus starting Ispell.
We may try `delay-mode-hooks' around `set-auto-mode', but it is not
honoured by `mhtml-mode'. I guess we can report this as Emacs bug.
> P.S. I also see Org starting Ispell over and over when holding down
> `C-v' in a long document that contains lots of scattered `LocalWords'
> comments.
This sounds like a normal Ispell behaviour.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-11 22:58 ` Flyspell causes severe slowdown when manipulating footnotes arozbiz
@ 2022-12-12 9:32 ` Ihor Radchenko
2022-12-12 14:04 ` arozbiz
0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2022-12-12 9:32 UTC (permalink / raw)
To: arozbiz; +Cc: emacs-orgmode
arozbiz@gmail.com writes:
> Thanks. It definitely helps, but it's still quite slow. What's made the
> biggest difference is is advising the relevant functions to turn flyspell
> off beforehand and then turn it back on.
Sure, but it is not going to help others.
Could you try to produce the profile using Org 9.5.5 and Org 9.6?
I am wondering if there is anything in Org 9.6 that is slowed compared
to Org 9.5.5.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-12 9:32 ` Ihor Radchenko
@ 2022-12-12 14:04 ` arozbiz
2022-12-12 14:09 ` Ihor Radchenko
0 siblings, 1 reply; 13+ messages in thread
From: arozbiz @ 2022-12-12 14:04 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
Happy to. What is the best way to temporarily downgrade to 9.5.5? I install
Emacs through this <https://aur.archlinux.org/packages/emacs-git> Arch AUR
package, which installs the latest version of Org automatically.
Best,
Alan
On Mon, Dec 12, 2022 at 3:32 AM Ihor Radchenko <yantar92@posteo.net> wrote:
> arozbiz@gmail.com writes:
>
> > Thanks. It definitely helps, but it's still quite slow. What's made the
> > biggest difference is is advising the relevant functions to turn flyspell
> > off beforehand and then turn it back on.
>
> Sure, but it is not going to help others.
>
> Could you try to produce the profile using Org 9.5.5 and Org 9.6?
> I am wondering if there is anything in Org 9.6 that is slowed compared
> to Org 9.5.5.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>
[-- Attachment #2: Type: text/html, Size: 1674 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell causes severe slowdown when manipulating footnotes
2022-12-12 14:04 ` arozbiz
@ 2022-12-12 14:09 ` Ihor Radchenko
0 siblings, 0 replies; 13+ messages in thread
From: Ihor Radchenko @ 2022-12-12 14:09 UTC (permalink / raw)
To: arozbiz; +Cc: emacs-orgmode
arozbiz@gmail.com writes:
> Happy to. What is the best way to temporarily downgrade to 9.5.5? I install
> Emacs through this <https://aur.archlinux.org/packages/emacs-git> Arch AUR
> package, which installs the latest version of Org automatically.
If you have Emacs 28, Org 9.5.5 is built-in there.
Or you can git clone Org repo, checkout release_9.5.5, and use it in
front of Emacs load-path when loading Emacs. See
https://orgmode.org/manual/Installation.html
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Flyspell process called frequently when using Org export (was: Flyspell causes severe slowdown when manipulating footnotes)
2022-12-12 9:30 ` Ihor Radchenko
@ 2024-05-11 10:06 ` Ihor Radchenko
0 siblings, 0 replies; 13+ messages in thread
From: Ihor Radchenko @ 2024-05-11 10:06 UTC (permalink / raw)
To: Rudolf Adamkovič; +Cc: arozbiz, emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
>> A new Ispell process started on export.
> ...
> Confirmed.
> This is because `org-html-final-function' uses `mhtml-mode' to indent the
> resulting html file. `mhtml-mode' unconditionally runs `prog-mode-hook'
> thus starting Ispell.
>
> We may try `delay-mode-hooks' around `set-auto-mode', but it is not
> honoured by `mhtml-mode'. I guess we can report this as Emacs bug.
Fixed, on main.
The fix will only work in Emacs 30+, because it requires Emacs bug fix
described in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70671
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e36a4fe20
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-05-11 10:05 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 1:34 Flyspell causes severe slowdown when manipulating footnotes arozbiz
2022-12-07 13:23 ` Ihor Radchenko
2022-12-08 14:12 ` arozbiz
2022-12-10 10:24 ` Ihor Radchenko
2022-12-10 23:43 ` Rudolf Adamkovič
2022-12-11 9:28 ` Flyspell process called frequently when using Org export (was: Flyspell causes severe slowdown when manipulating footnotes) Ihor Radchenko
2022-12-11 15:54 ` Rudolf Adamkovič
2022-12-12 9:30 ` Ihor Radchenko
2024-05-11 10:06 ` Ihor Radchenko
2022-12-11 22:58 ` Flyspell causes severe slowdown when manipulating footnotes arozbiz
2022-12-12 9:32 ` Ihor Radchenko
2022-12-12 14:04 ` arozbiz
2022-12-12 14:09 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).