From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/14848 Path: main.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.gnus.general Subject: faster expiry of sparse total-expire nnml groups Date: 31 Mar 1998 20:58:38 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035153973 18590 80.91.224.250 (20 Oct 2002 22:46:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:46:13 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id RAA20534 for ; Tue, 31 Mar 1998 17:55:48 -0800 Original-Received: from sina.hpc.uh.edu (root@Sina.HPC.UH.EDU [129.7.3.5]) by xemacs.org (8.8.5/8.8.5) with ESMTP id TAA00888 for ; Tue, 31 Mar 1998 19:59:54 -0600 (CST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id TAH19270; Tue, 31 Mar 1998 20:00:06 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 31 Mar 1998 19:59:04 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id TAA19256 for ; Tue, 31 Mar 1998 19:58:57 -0600 (CST) Original-Received: (qmail 3481 invoked by uid 504); 1 Apr 1998 01:58:36 -0000 Original-Received: (qmail 3478 invoked from network); 1 Apr 1998 01:58:36 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by claymore.vcinet.com with SMTP; 1 Apr 1998 01:58:35 -0000 Original-Received: from tweedledumb.cygnus.com (tweedledumb.cygnus.com [192.80.44.1]) by ifi.uio.no (8.8.8/8.8.7/ifi0.2) with ESMTP id DAA28703 for ; Wed, 1 Apr 1998 03:58:33 +0200 (MET DST) Original-Received: from cujo.cygnus.com (cujo.cygnus.com [192.80.44.10]) by tweedledumb.cygnus.com (8.8.5/8.8.5) with ESMTP id UAA06631 for ; Tue, 31 Mar 1998 20:58:31 -0500 (EST) Original-Received: (from raeburn@localhost) by cujo.cygnus.com (8.8.7/8.8.7) id UAA22516; Tue, 31 Mar 1998 20:58:38 -0500 Original-To: ding@ifi.uio.no Original-Lines: 40 X-Mailer: Quassia Gnus v0.34/Emacs 20.2 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:14848 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:14848 With NFS caching it's hard to judge exactly, but this patch appears to have improved the expire time on one of my total-expire groups (2610 articles, with an article number range almost ten times that) by maybe as much as 12x. If total-expire isn't set, it'll probably slow things down a little. It may be possible to speed up other parts of nnml-request-expire-articles slightly by relying on active-articles being sorted. Ken 1998-03-31 Ken Raeburn * nnml.el (nnml-request-expire-articles): Sort active-articles, then only expire the intersection of that set with the requested articles. Index: nnml.el =================================================================== RCS file: /0h/users/raeburn/.cvsfiles/lib/elisp/gnus/lisp/nnml.el,v retrieving revision 1.4 diff -p -u -r1.4 nnml.el --- nnml.el 1998/03/08 04:55:58 1.4 +++ nnml.el 1998/04/01 01:14:33 @@ -271,6 +271,11 @@ all. This may very well take some time. article rest mod-time number) (nnmail-activate 'nnml) + (setq active-articles (sort active-articles '<)) + ;; Articles not listed in active-articles are already gone, + ;; so don't try to expire them. + (setq articles (gnus-sorted-intersection articles active-articles)) + (while (and articles is-old) (when (setq article (nnml-article-to-file (setq number (pop articles)))) (when (setq mod-time (nth 5 (file-attributes article)))