Subject: bug#73766: 30.0.91; (documentation 'pcase) can take several seconds

From: Yikai Zhao <[email-masked]>
Date: Sun, 13 Oct 2024 22:10:24 +0800

On Sun, Oct 13, 2024 at 12:39 AM Stefan Monnier
<[email-masked]> wrote:
>
> >> Apparently, it would iterate over all defined pcase macros (N), and for
> >> each of those, `help-fns-short-filename` would iterate over all items in
> >> `load-path` (M). Total time complexity is N*M.
> > Adding Stefan and João, in case they have some comments or
> > suggestions.
>
> How 'bout a patch like the one below?

Hello,

I tried this patch and can confirm it improves the performance.
Here's the result of (benchmark-run (documentation 'pcase)):

- master: 4s
- master with this patch: 0.12s

However it's still slower than last stable version:
- 29.4 version: 0.02s

Yikai