GNU bug report logs -
#53606
29.0.50; Very slow Customize buffer for bibtex-biblatex-entry-alist
Previous Next
Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Fri, 28 Jan 2022 15:04:02 UTC
Severity: normal
Tags: confirmed
Found in version 29.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 10/9/23 09:41, Mauro Aranda wrote:
> On 10/9/23 07:43, Eli Zaretskii wrote:
> >> Date: Sun, 10 Sep 2023 06:49:29 -0300
> >> Cc: 53606 <at> debbugs.gnu.org
> >> From: Mauro Aranda <maurooaranda <at> gmail.com>
> >>
> >> On 10/9/23 02:01, Eli Zaretskii wrote:
> >> > Could you please profile this slow operation and post the
completely
> >> > unfolded profile? I think we should try to understand what exactly
> >> > takes so much time in this case.
> >>
> >> Here it is. I also attach the result of C-x C-w in the report buffer,
> >> just in case.
> >
> > So the hot spot seems to be widget-checklist-add-item, is that right?
>
> I think so. The checklist widgets were my first suspects, since
> creating them is rather slow.
>
> > And inside that widget-create-child and widget-apply?
>
> I don't think those functions could be the bottleneck. Most likely it
> is the widget-default-create function that those functions end up
> calling. So yes, widget-default-create in general, and
> widget-checklist-value-create in particular should be investigated for
> speeding them up, but I don't have any ideas at the moment.
I focused on the format handling, since there's no need to insert the
escape formats in the buffer. So I rearranged the 4 functions that
handle the format to avoid it and here are the figures I got, when
running:
(benchmark-run 5
(customize-option 'bibtex-biblatex-entry-alist))
From master, inserting either :format or :entry-format:
(130.200276352 291 3.1221133909999996)
Without inserting it:
(38.244185927000004 266 2.795578699)
| How? | Total elapsed time (5 repetitions) | Avg |
Times faster |
|----------------------+------------------------------------+-------+--------------|
| inserting format | 130.20 | 26.04
| 1 |
| not inserting format | 38.24 | 7.65
| 3.4 |
All data is without native compilation. I'd appreciate if someone could
at least run it once with native compilation, with and without my patch.
I attach a patch with the changes, and the new profiler report, but I'm
inclined to leave it as it is if the patch gets accepted.
[0001-Speed-up-widget-creation-Bug-53606.patch (text/x-patch, attachment)]
[profiler-data-no-inserting (text/plain, attachment)]
[profiler-results-no-inserting (text/plain, attachment)]
This bug report was last modified 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.