GNU bug report logs -
#18522
occasional slow performance in some Gnus code
Previous Next
Reported by: Peter Münster <pmlists <at> free.fr>
Date: Mon, 22 Sep 2014 10:38:02 UTC
Severity: normal
Tags: fixed
Found in version 24.4.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Peter Münster <pmlists <at> free.fr>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 18522 <at> debbugs.gnu.org
> Date: Thu, 25 Feb 2016 09:08:44 +0100
>
> > Just on a hunch -- what's the value of your `gnus-buffers' variable?
>
> (#<buffer *unsent mail*> #<buffer *sent mail to Eli Zaretskii*<2>> #<buffer
> *sent mail to Eli Zaretskii*> #<buffer *Article nndraft:drafts*> #<buffer
> *Original Article nndraft:drafts*> #<buffer *Summary nndraft:drafts*> #<killed
> buffer> #<buffer *nnmail message-id cache*> #<killed buffer> #<killed buffer>
> #<killed buffer> #<killed buffer> #<killed buffer> #<killed buffer> #<killed
> buffer> #<killed buffer> #<killed buffer> #<killed buffer> #<killed buffer>
> #<killed buffer> #<killed buffer> #<killed buffer> #<killed buffer> #<killed
> buffer> #<killed buffer> #<killed buffer> #<killed buffer> #<killed buffer>
> #<killed buffer> #<killed buffer> #<buffer *MML2015 Result*> #<killed buffer>
> #<buffer *gnus article copy*> #<buffer *Gnus Backlog*> #<buffer *gnus work*>
> #<buffer *Gnus agent overview*> #<buffer *Group*>)
OK, so is the following summary of this long discussion accurate?
. Peter noticed that Gnus is very slow entering a group
. Gnus is slow because parse-time-string takes a lot of time
. parse-time-string is slow because it let-binds case-fold-search
. binding case-fold-search is slow because Peter has a lot of
buffers, which set-default loops over to change the value of
case-fold-search in each one of them
. most of the buffers over which set-default loops were actually
killed, but they are still in all_buffers list which set-default
traverses, although they were supposed to be removed by GC
. killed buffers are not removed from all_buffers by GC because
they are referenced by gnus-buffers
. gnus-buffers references killed buffers because Peter kills buffers
behind Gnus back, instead of letting them be killed through
gnus-kill-buffer, which would have removed them from gnus-buffers
If the above is an accurate account of what we've discovered, then we
have several factors here that conspire to make Peter's Gnus slow:
. parse-time-string should try to avoid binding case-fold-search
globally, or at all
. set-default should skip killed buffers
. Peter should stop killing Gnus buffers behind Gnus back
For the first issue, I propose to modify parse-time-string to use
upcase and downcase instead of string-match. E.g., this:
(/= (downcase char) char)
can be used to detect upper-case characters, and similarly with
lower-case.
For the second issue, I propose to modify set-default to use
FOR_EACH_LIVE_BUFFER instead of FOR_EACH_BUFFER. Does anyone see a
problem with that?
For the third issue, Peter should make his buffer-killing code look in
gnus-buffers, and kill any buffers referenced by it through
gnus-kill-buffer. If this involves some standard Emacs features (like
'midnight', perhaps), then those features should also be adapted to
gnus-buffers.
Comments?
This bug report was last modified 8 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.