From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55468 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: Spam processing slows down group exit Date: Fri, 02 Jan 2004 11:08:47 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nznd6jptc.fsf@collins.bwh.harvard.edu> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073059813 18531 80.91.224.253 (2 Jan 2004 16:10:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2004 16:10:13 +0000 (UTC) Original-X-From: ding-owner+M4008@lists.math.uh.edu Fri Jan 02 17:10:10 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AcRsH-0006KR-00 for ; Fri, 02 Jan 2004 17:10:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AcRs6-0002dT-00; Fri, 02 Jan 2004 10:09:58 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AcRs2-0002dO-00 for ding@lists.math.uh.edu; Fri, 02 Jan 2004 10:09:54 -0600 Original-Received: from clifford.bwh.harvard.edu (clifford.bwh.harvard.edu [134.174.9.41]) by justine.libertine.org (Postfix) with ESMTP id 6A55A3A0026 for ; Fri, 2 Jan 2004 10:09:53 -0600 (CST) Original-Received: from collins.bwh.harvard.edu (collins [134.174.9.80]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id i02G8n716621 for ; Fri, 2 Jan 2004 11:08:49 -0500 (EST) Original-Received: from collins.bwh.harvard.edu (localhost [127.0.0.1]) by collins.bwh.harvard.edu (8.12.9+Sun/8.11.0) with ESMTP id i02G8muB026223 for ; Fri, 2 Jan 2004 11:08:48 -0500 (EST) Original-Received: (from tzz@localhost) by collins.bwh.harvard.edu (8.12.9+Sun/8.12.9/Submit) id i02G8lxY026220; Fri, 2 Jan 2004 11:08:47 -0500 (EST) Original-To: ding@gnus.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: ding@gnus.org In-Reply-To: (Reiner Steib's message of "Thu, 01 Jan 2004 14:51:27 +0100") User-Agent: Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3.50 (usg-unix-v) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55468 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55468 On Thu, 01 Jan 2004, 4.uce.03.r.s@nurfuerspam.de wrote: > I found that the group and topic parameters (spam/ham) are > calculated[1] for *every article* rather than once for each group > exit. I have set up spam processing for some IMAP groups and all > Gmane groups[2], but not for nnml (and other nntp groups). [...] > Couldn't each possible mark be checked _once_ per group exit instead > once for every article? (==> O(1) instead of O(n), AFAIKS.) There were two problems here, one that I had forgotten to use the new spam-list-articles function which encapsulated that check, and the other that I had forgotten to optimize spam-list-articles as I should have. OK, that's three problems, if you count my forgetfulness :) Fixed in CVS, take a look. I didn't bother with a global cache, because it would be much optimizing for a small gain, plus the customization functions would need triggers to set the caches to nil, plus if a user modified the ham-marks or spam-marks manually we're in trouble anyhow. Instead the caches of "yes" and "no" matches (spam-list-articles can take a classification, so "yes" the mark matches the 'spam or 'ham classification, or "no" it doesn't) are rebuilt every time the function spam-list-articles is run. > Why is `spam-ham-copy-or-move-routine' called in the first place? I > have not requested any spam processing in this group. It's called from spam-summary-prepare-exit, can you check why it's being invoked in your case in particular? It should only be called here (through the spam-ham-{copy,move}-routine proxies): (when (spam-group-ham-processor-copy-p gnus-newsgroup-name) (gnus-message 5 "Copying ham") (spam-ham-copy-routine (gnus-parameter-ham-process-destination gnus-newsgroup-name))) ;; now move all ham articles out of spam groups (when (spam-group-spam-contents-p gnus-newsgroup-name) (gnus-message 5 "Moving ham messages from spam group") (spam-ham-move-routine (gnus-parameter-ham-process-destination gnus-newsgroup-name)))) Thanks Ted