sorry everyone, I accidentally sent this to Kaushal this morning,  and then took quite a while to get back to a computer after he let me know my mistake!

On Tue, Feb 22, 2022 at 10:12 AM Matt Price <moptop99@gmail.com> wrote:

On Tue, Feb 22, 2022 at 12:45 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:


On Tue, Feb 22, 2022, 12:34 AM Ihor Radchenko <yantar92@gmail.com> wrote:

I am wondering if many people in the list experience latency issues.
Maybe we can organise an online meeting (jitsi or BBB) and collect the
common causes/ do online interactive debugging?

+1 

I have seen few people see this issue on the ox-hugo issue tracker: https://github.com/kaushalmodi/ox-hugo/discussions/551#discussioncomment-2104352

 
I htink it's a great idea, Ihor!

Meanwhile, I have a profile report. I had a little trouble getting the slowness to return (of course) but, subjectively, it seemed to get worse (subjectively slower, and the laptop fan started up b/c of high cpu usage) when I created and entered a src block. Apologies for the long paste:

       45707  70% - redisplay_internal (C function)
        8468  13%  - substitute-command-keys
        6111   9%   - #<compiled -0x1c8c1b294a898af3>
         943   1%    - kill-buffer
         708   1%     - replace-buffer-in-windows
         614   0%      - unrecord-window-buffer
         515   0%       - assq-delete-all
         142   0%          assoc-delete-all
           3   0%     delete-char
        8060  12%  - assq
        2598   4%   - org-context
          15   0%      org-inside-LaTeX-fragment-p
          12   0%    - org-in-src-block-p
          12   0%     - org-element-at-point
           9   0%      - org-element--cache-verify-element
           9   0%         org-element--parse-to
           3   0%        org-element--parse-to
           8   0%    - org-at-timestamp-p
           8   0%       org-in-regexp
         642   0%  + tab-bar-make-keymap
         309   0%  + and
         270   0%  + org-in-subtree-not-table-p
         196   0%  + not
         163   0%  + jit-lock-function
         115   0%  + org-entry-get
          96   0%    keymap-canonicalize
          56   0%    org-at-table-p
          52   0%  + #<compiled -0x16b737fc61e8f6c2>
          48   0%  + #<compiled 0xf76e59543b881ee>
          43   0%    table--row-column-insertion-point-p
          29   0%    org-inside-LaTeX-fragment-p
          27   0%  + menu-bar-positive-p
          26   0%  + eval
          24   0%    file-readable-p
          21   0%  + funcall
          16   0%  + imenu-update-menubar
          14   0%  + vc-menu-map-filter
          13   0%  + table--probe-cell
          12   0%  + or
          11   0%  + let
          11   0%  + org-at-timestamp-p
          10   0%  + flycheck-overlays-at
           7   0%    undo-tree-update-menu-bar
           6   0%  + require
           6   0%  + emojify-update-visible-emojis-background-after-window-scroll
           6   0%    kill-this-buffer-enabled-p
           4   0%    mode-line-default-help-echo
           3   0%  + null
        9192  14% - ...
        9172  14%    Automatic GC
          20   0%  - kill-visual-line
          20   0%   - kill-region
          20   0%    - filter-buffer-substring
          20   0%     - org-fold-core--buffer-substring-filter
          20   0%      - buffer-substring--filter
          20   0%       - #<compiled -0xf6f823dd60bce2>
          20   0%        - apply
          20   0%         - #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_18>
          20   0%          - #<compiled -0x18bec5098484d202>
          20   0%           - apply
          20   0%            - #<compiled -0x10861dfcfb752f31>
          20   0%             - #<compiled -0xf6f823dd60bce2>
          20   0%              - #<compiled -0xf6f823dd60bce2>
          20   0%               - apply
          20   0%                - #<compiled -0xab81927f0743ad>
          20   0%                 + delete-and-extract-region
        7847  12% - command-execute
        5749   8%  - funcall-interactively
        2963   4%   + org-self-insert-command
        2186   3%   + org-cycle
         148   0%   + corfu-insert
         146   0%   + execute-extended-command
         121   0%   + org-return
          32   0%   + #<lambda 0xb0f62da54c2c7>
          26   0%   + #<lambda 0xb0f62da54c2cb>
          24   0%   + mwim-beginning
          19   0%   + org-delete-backward-char
          19   0%   + org-kill-line
           9   0%   + #<lambda 0xb0f62da54c2ec>
           6   0%   + file-notify-handle-event
        2095   3%  + byte-code
        1359   2% + timer-event-handler
         375   0% + org-appear--post-cmd
         160   0% + corfu--post-command
          61   0% + org-fragtog--post-cmd
          14   0% + emojify-update-visible-emojis-background-after-command
          11   0%   guide-key/close-guide-buffer
           7   0% + flycheck-perform-deferred-syntax-check
           7   0% + flycheck-maybe-display-error-at-point-soon
           6   0%   undo-auto--add-boundary
           6   0% + corfu--auto-post-command
           4   0%   flycheck-error-list-update-source
           3   0%   internal-timer-start-idle
           3   0%   sp--post-command-hook-handler
---------------
For fun, I tried a second time with font-lock-mode turned off.  I didn't notice much difference in speed subjectively. The profile showed an even higher percentage for redisplay_internal, though I don't quite understand exactly how much of that is triggered by the higher-order functions listed below it, esp org-in-src-block-p and org-inside-latex-fragment-p. In any case, here it is for ocmparison:

       20128  80% - redisplay_internal (C function)
        7142  28%  - assq
         908   3%   - org-context
          12   0%      org-inside-LaTeX-fragment-p
           6   0%    + org-in-src-block-p
        3060  12%  - substitute-command-keys
        2176   8%   - #<compiled -0x1c8c1b3af6786af3>
         320   1%    - kill-buffer
         237   0%     - replace-buffer-in-windows
         197   0%      - unrecord-window-buffer
         158   0%       - assq-delete-all
          57   0%          assoc-delete-all
           6   0%   + delete-char
         215   0%  + tab-bar-make-keymap
          97   0%  + org-in-subtree-not-table-p
          94   0%  + and

          44   0%  + not
          41   0%  + keymap-canonicalize
          25   0%  + #<compiled 0xf76e59543b881ee>
          22   0%  + eval
          21   0%  + jit-lock-function
          16   0%  + org-entry-get
          15   0%    org-at-table-p
          14   0%  + #<compiled -0x16b737fc61e8f6c2>
          12   0%  + vc-menu-map-filter
          10   0%  + org-at-timestamp-p
           6   0%  + let
           6   0%    file-readable-p
           6   0%    table--row-column-insertion-point-p
           4   0%  + imenu-update-menubar
           4   0%    eq
           3   0%  + or
           3   0%    org-inside-LaTeX-fragment-p
           3   0%    kill-this-buffer-enabled-p
           3   0%    display-graphic-p
           3   0%    get-buffer-process
        3082  12% - ...
        3082  12%    Automatic GC
        1546   6% - command-execute
         968   3%  - byte-code
         968   3%   - read-extended-command
         968   3%    - completing-read-default
         968   3%     - apply
         968   3%      - vertico--advice
         695   2%       + #<subr completing-read-default>
         578   2%  - funcall-interactively
         534   2%   - org-self-insert-command
          31   0%    + org-fold-core--fix-folded-region
          25   0%    + org-num--verify
           9   0%    + flycheck-handle-change
           8   0%    + org-element--cache-after-change
           7   0%    + org-indent-refresh-maybe
           6   0%    + jit-lock-after-change
           5   0%      org-at-table-p
           4   0%      org-fix-tags-on-the-fly
           3   0%      org-fold-check-before-invisible-edit--text-properties
           3   0%      org-indent-notify-modified-headline
          12   0%   + org-delete-backward-char
           4   0%   + #<lambda 0xb0f62da54c2ec>
           3   0%   + #<lambda 0xb0f62da54c2cb>
         279   1% + timer-event-handler
          26   0% + org-appear--post-cmd
          12   0% + emojify-update-visible-emojis-background-after-command
           9   0% + org-fragtog--post-cmd
           8   0% + undo-auto--add-boundary
           4   0%   corfu--auto-post-command
           4   0%   internal-timer-start-idle
           3   0% + flycheck-maybe-display-error-at-point-soon


-----------------------------------------

Does this look at all useful so far?