GNU bug report logs - #36697
27.0.50; gnus: some articles with score 0 are killed

Previous Next

Packages: emacs, gnus;

Reported by: sds <at> gnu.org

Date: Tue, 16 Jul 2019 20:52:01 UTC

Severity: normal

Found in version 27.0.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: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sam Steingold <sds <at> gnu.org>
Cc: 36697 <at> debbugs.gnu.org
Subject: bug#36697: 27.0.50; gnus: some articles with score 0 are killed
Date: Fri, 24 Jul 2020 17:27:45 +0200
Sam Steingold <sds <at> gnu.org> writes:

> `gnus-score-string' is called from `gnus-score-headers',
> `search-func` is `re-search-backward'
> It is called on line 2148 on `match' which is "[^a-z]\\{50\\}".
> So, it matches for _all_ subjects - _before_ the last 3 - because it
> searches _across_ lines!

Oh, yeah, I had forgotten that -- it's a neat hack to speed up the time
to score big groups: Calling re-search-backward is much, much faster
than looping over the headers and using string-match.  But it does mean
that if you have regexps like [^a-z], they have to have a \n in them,
too.

> PS. The code in gnus-score.el seems to avoid modern Emacs-Lisp features
> like `dolist' and `when'.  Is there a (non-historical) reason for that?
> Also, the functions are very long and thus hard to edebug.

It's just very, very old code, trying to be maximally fast.

> I had to extract some loops into separate functions to speed up stepping.
> Is it okay to commit?

Is there a performance impact?  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.