From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: eldoc-mode suspend Emacs for about 20 seconds when point moved on `pcase`
Date: Sat, 01 Jun 2024 14:21:30 -0400 [thread overview]
Message-ID: <jwv34pwsf4s.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 665abc68.170a0220.37c58e.69e4@mx.google.com
> When I move point on Elisp code where is `(pcase|`. (The | represent the point)
> This issue happened every time when I move point on `pcase`.
> Here is the profiler report of CPU and Memory:
[ Can you reproduce it on purpose in a fresh Emacs session?
If so, please file a bug report for it. ]
> CPU Profiler Report
> #+begin_example
> 15205 89% - timer-event-handler
> 15205 89% - apply
> 15170 88% - #<byte-code-function 022>
> 15170 88% - eldoc-print-current-symbol-info
> 15170 88% - eldoc--invoke-strategy
> 15170 88% - eldoc-documentation-default
> 15170 88% - run-hook-wrapped
> 15170 88% - #<byte-code-function 0D6>
> 15170 88% - elisp-eldoc-funcall
> 15159 88% - apply
> 15159 88% - elisp-get-fnsym-args-string
> 15158 88% - documentation
> 15158 88% - pcase--make-docstring
> 15042 88% - help-fns-short-filename
> 15019 87% - file-relative-name
> 14867 87% file-name-case-insensitive-p
Hmm...
There are several inefficiencies at the level of `pcase--make-docstring`
(designed to generate the occasional *Help* buffer rather than the
on-the-fly eldoc info) as well as `help-fns-short-filename`, but the
costly operations are not supposed to be `file-name-case-insensitive-p`.
If on some systems `file-name-case-insensitive-p` can be slow, maybe we
should add some caching mechanism to it?
Stefan
prev parent reply other threads:[~2024-06-01 18:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-01 6:14 eldoc-mode suspend Emacs for about 20 seconds when point moved on `pcase` Christopher M. Miles
2024-06-01 6:43 ` Eli Zaretskii
2024-06-01 18:21 ` Stefan Monnier via Users list for the GNU Emacs text editor [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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv34pwsf4s.fsf-monnier+emacs@gnu.org \
--to=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.
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).