unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 73766@debbugs.gnu.org, yikai@z1k.dev, joaotavora@gmail.com
Subject: bug#73766: 30.0.91; (documentation 'pcase) can take several seconds
Date: Fri, 18 Oct 2024 16:42:32 -0400	[thread overview]
Message-ID: <jwvldylnofg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86msj1mf8m.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Oct 2024 21:35:05 +0300")

>> >> There's still a remaining performance issue for things like
>> >> `eldoc-mode`, admittedly where we'd really want it to be instantaneous,
>> >> but I think this should be fixed by making `eldoc` call `documentation`
>> >> in a special way to skips those useless computations (eldoc just wants
>> >> a "short doc" anyway).  This affects other functions using the
>> >> `function-documentation` property in a similar way.
>> > Does it mean that this slowdown of eldoc was also caused by commit
>> > 052c2ce0284c5193c9d6768a45a9b3508af51230, and if so, does the patch
>> > you've shown previously (and which you consider not safe enough for
>> > emacs-30) solve the eldoc slowdown as well?
>> 
>> What I meant is that the 4s slowdown affects both `C-h f` and eldoc,
>> and that the patch I sent which reduces it to 0.12s is IMO sufficient
>> for the `C-h f` case but may still make Emacs feel occasionally a bit
>> sluggish when eldoc hits this 0.12s.
>
> If the slowdown of eldoc is significant, maybe we will be better with
> reverting the change which introduced the regression on emacs-30,
> and then solving on master with your more thorough fix.

The "quickfix" I installed on `emacs-30` should not suffer from
a significant slowdown, no, so I think we're good for `emacs-30`.

The "better" fix I installed on `master`, may still cause a bit of
sluggishness with eldoc, OTOH.

I think the "right" fix for that is to extend `documentation` or `C-h f`
such that the `pcase` doc can distinguish between the (quick to
generate) doc about `pcase` itself and the table of Pcase patterns
defined with `pcase-defmacro` which is appended to the end of the
`pcase` doc (and which can take a bit of time to generate but is not
needed for eldoc).

It would also be good to be able to show the table in a kind of
abbreviated form (one line per Pcase pattern) with a way to
unfold/refold specific patterns' doc.

The same applies to the list of methods displayed in the doc of generic
functions and in the doc of types.


        Stefan






      reply	other threads:[~2024-10-18 20:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-12  8:02 bug#73766: 30.0.91; (documentation 'pcase) can take several seconds Yikai Zhao
2024-10-12  9:22 ` Eli Zaretskii
2024-10-12 16:39   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-13 14:10     ` Yikai Zhao
2024-10-17 17:22       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18  1:22         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18  5:57           ` Eli Zaretskii
2024-10-18  7:08         ` Eli Zaretskii
2024-10-18 17:04           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18 18:35             ` Eli Zaretskii
2024-10-18 20:42               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [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=jwvldylnofg.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73766@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=yikai@z1k.dev \
    /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.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).