From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: info-gnus-english@gnu.org
Subject: Re: slow saving of scores when leaving a virtual (nnml+) group
Date: Thu, 06 Jul 2023 08:43:01 -0700 [thread overview]
Message-ID: <87cz15avwa.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87pm55e01v.fsf@ucl.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Hello all,
>
> recently (past week or two), I've noticed a slow down in leaving some of
> my nnml groups. Using the profiler, I see the outcomes shown below,
> capturing cpu and memory when entering a virtual group, that collects 3
> different nnml groups, and then immediately leaving that group. A
> significant amount of time is taken saving scores, as far as I can tell.
> I use adaptive scoring. Nothing with respect to scoring has changed in
> my configuration in some time (years probably).
>
> The offending function appears to be "lisp--local-defform-body-p" with
> large memory and cpu use.
>
> Cpu report (partly expanded):
>
> 10133 79% - command-execute
> 8519 66% - funcall-interactively
> 4767 37% - gnus-summary-exit
> 4659 36% - gnus-score-save
> 4655 36% - gnus-pp
> 4655 36% - pp
> 4655 36% - pp-to-string
> 4655 36% - pp-fill
> 4647 36% - pp--object
> 4627 36% - pp-fill
> 4615 36% - pp-fill
> 4555 35% - pp-fill
> 4263 33% - pp-fill
> 4243 33% - indent-according-to-mode
> 4243 33% - lisp-indent-line
> 4163 32% - calculate-lisp-indent
> 4163 32% - lisp-indent-function
> 4163 32% lisp--local-defform-body-p
> 48 0% + lisp-ppss
A few weeks ago Stefan Monnier made a change to lisp-ppss. It was meant
to improve performance, but the timing looks very suspicious and it may
have had unexpected side effects. The commit is f411cc3a9578eae4ea4549,
I've attached a patch that reverts it, you might give this a try? If it
clearly fixes the problem, I would open a bug report and cc Stefan.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: revert_ppss.diff --]
[-- Type: text/x-patch, Size: 559 bytes --]
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 1990630608d..3613c8d88ec 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -876,7 +876,7 @@ lisp-ppss
2 (counting from 0). This is important for Lisp indentation."
(unless pos (setq pos (point)))
(let ((pss (syntax-ppss pos)))
- (if (and (not (nth 2 pss)) (nth 9 pss))
+ (if (nth 9 pss)
(let ((sexp-start (car (last (nth 9 pss)))))
(parse-partial-sexp sexp-start pos nil nil (syntax-ppss sexp-start)))
pss)))
next prev parent reply other threads:[~2023-07-06 15:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 11:45 Eric S Fraga
2023-07-06 15:43 ` Eric Abrahamsen [this message]
2023-07-07 7:05 ` Eric S Fraga
2023-07-07 15:41 ` Eric Abrahamsen
2023-07-08 8:52 ` Eric S Fraga
2023-07-08 1:22 ` Michael Heerdegen
2023-07-08 8:51 ` Eric S Fraga
2023-07-09 5:23 ` Michael Heerdegen
2023-07-10 15:41 ` Eric S Fraga
2023-07-11 2:56 ` Michael Heerdegen
2023-07-11 9:18 ` Eric S Fraga
2023-07-12 0:48 ` Michael Heerdegen
2023-07-12 10:08 ` Eric S Fraga
2023-07-13 0:18 ` Michael Heerdegen
2023-07-13 12:14 ` Eric S Fraga
2023-07-13 23:56 ` Michael Heerdegen
2023-07-14 11:05 ` Eric S Fraga
2023-07-16 2:55 ` Michael Heerdegen
2023-07-17 7:32 ` Eric S Fraga
2023-07-18 6:16 ` Michael Heerdegen
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=87cz15avwa.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=info-gnus-english@gnu.org \
/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.
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 NNTP newsgroup(s).