Date: Fri, 3 Nov 2000 13:18:40 -0800 (PST) From: asami@FreeBSD.org (Satoshi - Ports Wraith - Asami) To: taoka@FreeBSD.org Cc: ports-jp@jp.FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/news Makefile ports/news/t-gnus-emacs20 Makefile distinfo pkg-comment pkg-descr pkg-message pkg-plist.emacs20 pkg-plist.mule pkg-plist.xemacs21-mule ports/news/t-gnus-emacs20/files patch-aa patch-ab patch-ac patch-ad patch-ae patch-af ... Message-ID: <200011032118.eA3LIeD38866@silvia.hip.berkeley.edu> In-Reply-To: <200011031501.HAA65475@freefall.freebsd.org> (message from Satoshi Taoka on Fri, 3 Nov 2000 07:01:53 -0800 (PST)) References: <200011031501.HAA65475@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Log: * t-gnus for emacs20, mule or xemacs21-mule is a kind of gnus using SEMI * for MIME $B$I$&$b$"$j$,$H$&$4$6$$$^$9!#(Bemacs-20.7$B$N(Bgnus$B$h$j$O$k$+$KAG@2$i$7$$$G$9(B $B$M!#$3$l$G%5%V%8%'%/%H$NF|K\8l$H$+$,%U%C%/$J$7$G$b$A$c$s$HI=<($5$l$k$h(B $B$&$K$J$j$^$7$?$7!"0JA0A{$$$G$$$?(BRMAIL$B$NF|K\8l$rFI$`$HJ8;z%3!<%I$,$V$C(B $BHt$VLdBj!J$=$N$?$a$K(Bgnus-article-display-hook $B$G5-;v$K(B /bin/cat $B$r$+$1(B $B$F$$$?$H$$$&(B...$B!K$b$J$/$J$j$^$7$?!#(B $B$H$3$m$G!"#2E@$@$1!#(Binfo$B%U%!%$%k$,(B"gnus"$BEy$NL>A0$G%$%s%9%H!<%k$5$l$k$N(B $B$O$A$g$C$H$^$:$/$J$$$G$7$g$&$+!#$3$N$^$^$@$H(Bemacs$B$N$b$N$r=q$-49$($F$7(B $B$^$$$^$9!#$"$H!"FbMFE*$KIaDL$N(Bgnus$B$H6qBNE*$K!JJQ?tL>$H$+!K$I$&0c$&$N$+(B $B$r=q$$$F$b$i$&$H=u$+$k$H;W$&$s$G$9$,!"$3$l$O(Bt-gnus$B$N:n<T$NJ}$K8@$&$Y$-(B $B$3$H$G$9$M!#(B $B$b$&0l$D$O(Bnnbabyl.el$B$N$3$H$G!"8E$$L$FI%a%C%;!<%8$,$"$k$H%a!<%k%0%k!<%W(B $B$+$i(Bq$B!J$7$?$H$-$KAv$k(Bexpire$B!K$,0[MM$KCY$/$J$k$H$$$&LdBj$,$"$j$^$9!#$3(B $B$l$O5-;v$,$I$N%K%e!<%9%0%k!<%W$KB0$7$F$$$k$+$r7+$jJV$7(BRMAIL$B%U%!%$%k$r(B $BFI$s$GC5$7$F$$$k$+$i$G!"0JA0$3$l$rD>$9%Q%C%A$r:n$C$F(Bgnus$B$N:n<T$NJ}$KAw$C(B $B$?$s$G$9$,$J$7$N$D$V$F$G$9!#$3$N(Bt-gnus$B$G$bD>$C$F$$$J$$$h$&$G$9$N$G!"$3(B $B$l$r(Bport$B$KF~$l$k$H$H$b$K!"(Bt-gnus$B$N:n<T$NJ}$KEA$($F$$$?$@$1$^$9$G$7$g$&(B $B$+!#(B $B$"$5$_(B --- From: asami@FreeBSD.org (Satoshi Asami) Subject: faster expiry in nnbabyl To: bugs@gnus.org (The Gnus Bugfixing Girls + Boys) Date: 12 Apr 2000 15:20:29 -0700 Message-ID: <vqcr9cbotaq.fsf@silvia.hip.berkeley.edu> X-Mailer: Gnus v5.7/Emacs 20.6 Girls and Boys, This is not a bug report but rather an improvement suggestion. Currently, expiring mails when you are using nnbabyl (RMAIL format mailboxes) is horrendously slow if you have an old unread mail. The expiry code searches a large part of the RMAIL buffer over and over to see whether a certain article is in the group. Since the article numbers it searches start from the smallest still-known-to-be-alive article (basically the oldest unread mail) and increases by one each time, it will potentially have to search a large portion of the buffer (starting from where the previous search ended) hundreds of times even when you have only one old article and everything in-between is gone. I have changed it to go through the buffer once at the beginning to create a list (called "article-list" in the function) and then using "member" to check whether a particular article is still alive. It will search through the buffer for it only if it is known to be there. Admittedly I'm no lisp programmer so the code is ugly, but at least it works. And now instead of waiting 30 minutes on my old P6-200 after I press "q" in a large mail group, I only have to wait a few seconds. :) Satoshi ------- (deffoo nnbabyl-request-expire-articles (articles newsgroup &optional server force) (nnbabyl-possibly-change-newsgroup newsgroup server) (let* ((is-old t) rest article-list) (nnmail-activate 'nnbabyl) (save-excursion (set-buffer nnbabyl-mbox-buffer) (gnus-set-text-properties (point-min) (point-max) nil) (goto-char (point-min)) (while (re-search-forward (concat "\nX-Gnus-Newsgroup: " nnbabyl-current-group ":\\([0-9]+\\)") nil t) (setq article-list (cons (string-to-int (buffer-substring (match-beginning 1) (match-end 1))) article-list))) (while (and articles is-old) (goto-char (point-min)) (when (member (car articles) article-list) (search-forward (nnbabyl-article-string (car articles)) nil t) (if (setq is-old (nnmail-expired-article-p newsgroup (buffer-substring (point) (progn (end-of-line) (point))) force)) (progn (nnheader-message 5 "Deleting article %d in %s..." (car articles) newsgroup) (nnbabyl-delete-mail)) (push (car articles) rest))) (setq articles (cdr articles))) (save-buffer) ;; Find the lowest active article in this group. (let ((active (nth 1 (assoc newsgroup nnbabyl-group-alist)))) (goto-char (point-min)) (while (and (not (search-forward (nnbabyl-article-string (car active)) nil t)) (<= (car active) (cdr active))) (setcar active (1+ (car active))) (goto-char (point-min)))) (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file) (nconc rest articles)))) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011032118.eA3LIeD38866>