emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: profiling latency in large org-mode buffers (under both main & org-fold feature)
Date: Tue, 22 Feb 2022 21:41:10 -0500	[thread overview]
Message-ID: <CAN_Dec-yJo2FUYLMVXcMYuuW1xfTePQDoVis-NU_Jj9Co+w3hg@mail.gmail.com> (raw)
In-Reply-To: <CAN_Dec8kW5hQoa0xr7sszafYJJNmGipX0DA94DKNh11DWjce8g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 9082 bytes --]

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?
>
>

[-- Attachment #2: Type: text/html, Size: 11953 bytes --]

  parent reply	other threads:[~2022-02-23  2:42 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 21:06 profiling latency in large org-mode buffers (under both main & org-fold feature) Matt Price
2022-02-21 22:22 ` Samuel Wales
2022-02-22  5:33   ` Ihor Radchenko
2022-02-22  5:44     ` Kaushal Modi
     [not found]       ` <CAN_Dec8kW5hQoa0xr7sszafYJJNmGipX0DA94DKNh11DWjce8g@mail.gmail.com>
2022-02-23  2:41         ` Matt Price [this message]
2022-02-23  5:22           ` Ihor Radchenko
2022-02-23 14:47             ` Matt Price
2022-02-23 15:10               ` Ihor Radchenko
2022-02-22 21:11     ` Rudolf Adamkovič
2022-02-23 12:37       ` Org mode profiling meetup on Sat, Feb 26 (was: profiling latency in large org-mode buffers (under both main & org-fold feature)) Ihor Radchenko
2022-02-23 16:43         ` Kaushal Modi
2022-02-25 14:30         ` Ihor Radchenko
2022-02-26 12:04           ` Ihor Radchenko
2022-02-26 12:51             ` Ihor Radchenko
2022-02-26 15:51               ` Quiliro Ordóñez
2022-03-23 10:57                 ` #2 Org mode profiling meetup on Sat, Mar 26 (was: Org mode profiling meetup on Sat, Feb 26 (was: profiling latency in large org-mode buffers (under both main & org-fold feature))) Ihor Radchenko
2022-03-24 11:17                   ` Ihor Radchenko
2022-03-24 11:27                   ` Bruce D'Arcus
2022-03-24 13:43                     ` Matt Price
2022-03-24 13:49                     ` Ihor Radchenko
2022-03-26 11:59                   ` Ihor Radchenko
2022-03-27  8:14                     ` Ihor Radchenko
2022-04-21  8:05                   ` #3 Org mode profiling meetup on Sat, Apr 23 (was: #2 Org mode profiling meetup on Sat, Mar 26) Ihor Radchenko
2022-04-23 12:08                     ` Ihor Radchenko
2022-04-24  4:27                       ` Ihor Radchenko
2022-02-27  7:41               ` Org mode profiling meetup on Sat, Feb 26 (was: profiling latency in large org-mode buffers (under both main & org-fold feature)) Ihor Radchenko
2022-02-23 16:03     ` profiling latency in large org-mode buffers (under both main & org-fold feature) Max Nikulin
2022-02-23 16:35       ` Ihor Radchenko
2022-02-25 12:38         ` Max Nikulin
2022-02-26  7:45           ` Ihor Radchenko
2022-02-26 12:45             ` Max Nikulin
2022-02-27  6:43               ` Ihor Radchenko
2022-03-02 12:23                 ` Max Nikulin
2022-03-02 15:12                   ` Ihor Radchenko
2022-03-03 14:56                     ` Max Nikulin
2022-03-19  8:49                       ` Ihor Radchenko
2022-02-26 15:07     ` Jean Louis
2022-02-23  2:39   ` Matt Price
2022-02-23  5:25     ` Ihor Radchenko
2022-02-22  5:30 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN_Dec-yJo2FUYLMVXcMYuuW1xfTePQDoVis-NU_Jj9Co+w3hg@mail.gmail.com \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).