From: Ihor Radchenko <yantar92@gmail.com>
To: Matt Price <moptop99@gmail.com>
Cc: 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 13:30:48 +0800 [thread overview]
Message-ID: <87ilt7piwn.fsf@localhost> (raw)
In-Reply-To: <CAN_Dec8aVcO7f0WR8skdC05Ahp_3OuzrS3JP0vyDe8gfrq2WnQ@mail.gmail.com>
Matt Price <moptop99@gmail.com> writes:
> However, if I instead use my fairly extensive main config, latency is high
> enough that there's a noticeable delay while typing ordinary words. I see
> this regardless of whether I build from main or from Ihor's org-fold
> feature branch on github. The profiler overview here is pretty different --
> redisplay_internal takes a much higher percentage of the CPU requirement:
>
> 3170 56% - redisplay_internal (C function)
> ....
> 1200 21% - completing-read-default
> 1200 21% - apply
> 1200 21% - vertico--advice
> 475 8% + #<subr completing-read-default>
Judging from the profiler report, you did not collect enough number of
CPU samples. I recommend to keep the profiler running for at least 10-30
seconds when trying to profile typing latency. Also, note that running
M-x profiler-report second time will _not_ reproduce the previous
report, but instead show CPU profiler report between the last invocation
of profiler-report and the second one. I recommend to do the following:
1. M-x profiler-stop
2. M-x profiler-start
3. Do typing in the problematic Org file for 10-30 seconds
4. M-x profiler-report (once!)
5. Share the report here
> I've almost never used the profiler and am not quite sure how I should
> proceed to debug this. I realize I can comment out parts of the config one
> at a time, but that is not so easy for me to do in my current setup, and I
> suppose there are likely to be multiple contributing causes, which I may
> not really notice except in the aggregate.
The above steps should be the first thing to try and they will likely
reveal the bottleneck. If not, you can go back to genetic bisection. I
do not recommend manual commenting/uncommenting parts of you large
config. Instead, you can try
https://github.com/Malabarba/elisp-bug-hunter. But only if CPU profiling
does not reveal anything useful.
Best,
Ihor
prev parent reply other threads:[~2022-02-22 5:31 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilt7piwn.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=moptop99@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.