all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 50599@debbugs.gnu.org
Subject: bug#50599: [PATCH] Don't recommend against "\[...]" substitutions for performance
Date: Wed, 15 Sep 2021 09:38:53 +0300	[thread overview]
Message-ID: <83v932bawy.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkm=m3L-OSUFHEuiEL1cpy10vDMaoWpENWTdUgkVwSrDFgg@mail.gmail.com> (message from Stefan Kangas on Wed, 15 Sep 2021 08:27:55 +0200)

> From: Stefan Kangas <stefan@marxist.se>
> Date: Wed, 15 Sep 2021 08:27:55 +0200
> 
> (progn (require 'ibuffer)
>        (let ((times 100))
>          (/ (car (benchmark-run
>                      times (documentation 'ibuffer-mode)))
>             times)))
> 
>     => 0.00499586008
> 
> When I increase the number of substitutions in that docstring to around 1000 (by
> duplicating the docstring 10 times), I get:
> 
>     => 0.05029239337
> 
> This is 10 times slower, but still fast enough that it does not matter much.
> It also suggests that this is O(N) in time.
> 
> My conclusion is that the above recommendation in `(elisp) Documentation Tips'
> is irrelevant these days, and I suggest to remove it.
> 
> Please see the attached patch.

Thanks for the research, but the removal you propose is too radical.
The text already says "very many times".  You are saying that on your
system (which has what CPU, btw?) "very many" is a very large number,
but even for you 1000 references takes 50 msec, which begins to be
significant.

So I'm okay with somehow modifying the text to provide a better idea
of what "very many" means nowadays, but I think the advice is still
valid and shouldn't be removed.  We cannot guarantee that arbitrarily
large number of such references will not slow down help display.





  reply	other threads:[~2021-09-15  6:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  6:27 bug#50599: [PATCH] Don't recommend against "\[...]" substitutions for performance Stefan Kangas
2021-09-15  6:38 ` Eli Zaretskii [this message]
2021-09-15  7:11   ` Stefan Kangas
2021-09-15  8:24     ` Eli Zaretskii
2021-09-15 14:13       ` Stefan Kangas
2021-09-15 15:41         ` Eli Zaretskii
2021-09-15 18:37           ` Stefan Kangas
2021-09-15 19:03             ` Eli Zaretskii
2021-09-16 14:08               ` Lars Ingebrigtsen
2021-09-15 15:46         ` bug#50599: [External] : " Drew Adams

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=83v932bawy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=50599@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /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.