From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59564 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?Q?Bj=F8rn_Mork?= Newsgroups: gmane.emacs.gnus.general Subject: Re: IMAP article move Date: Tue, 11 Jan 2005 10:16:46 +0100 Organization: Darkness of Dads Message-ID: <87mzvgxr41.fsf@obelix.mork.no> References: <4nr7n4b12g.fsf@lifelogs.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1105435244 29156 80.91.229.6 (11 Jan 2005 09:20:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Jan 2005 09:20:44 +0000 (UTC) Original-X-From: ding-owner+M8104@lists.math.uh.edu Tue Jan 11 10:20:35 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CoICY-0004XM-00 for ; Tue, 11 Jan 2005 10:20:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CoI96-0007Va-00; Tue, 11 Jan 2005 03:17:00 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CoI90-0007VV-00 for ding@lists.math.uh.edu; Tue, 11 Jan 2005 03:16:54 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CoI8u-0005xU-53 for ding@lists.math.uh.edu; Tue, 11 Jan 2005 03:16:48 -0600 Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1CoI8t-0001Cy-00 for ; Tue, 11 Jan 2005 10:16:47 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 76 Original-NNTP-Posting-Host: host-81-191-111-181.bluecom.no Original-X-Trace: quimby.gnus.org 1105435007 4647 81.191.111.181 (11 Jan 2005 09:16:47 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Tue, 11 Jan 2005 09:16:47 +0000 (UTC) User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:qjEX2ESF/GIlzzatdqK0BuPuK2A= Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59564 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59564 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Simon Josefsson writes: > What are you proposing? There is some optimization in > nnimap-request-move-article and nnimap-request-accept-article to make > moving more efficient, and I thought it was pretty fast. But I rarely > copy/move articles, so I wouldn't know. Maybe you could illustrate by > comparing which IMAP commands are sent now, and which commands you > want to be sent? On a related issue: nnimap expiry with an expiry-target on the same IMAP server is terribly slow. To the degree that's entirely unusable. I just got a new laptop and installed a fresh copy of CVS Gnus, and that's when I noticed that this hasn't been fixed. The attached patch has fixed the problem for me on the old laptop (and now also on the new one). nnimap expiry will still be unecessarily slow with other expiry- targets, but I don't know how to fix that. Bjørn -- How can you say that you wish you were a mental problem? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nnimap-fix.patch Index: lisp/nnimap.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnimap.el,v retrieving revision 7.13 diff -u -u -r7.13 nnimap.el --- lisp/nnimap.el 26 Oct 2004 17:40:05 -0000 7.13 +++ lisp/nnimap.el 11 Jan 2005 08:53:24 -0000 @@ -1452,14 +1452,23 @@ (defun nnimap-expiry-target (arts group server) (unless (eq nnmail-expiry-target 'delete) - (with-temp-buffer - (dolist (art arts) - (nnimap-request-article art group server (current-buffer)) - ;; hints for optimization in `nnimap-request-accept-article' - (let ((nnimap-current-move-article art) - (nnimap-current-move-group group) - (nnimap-current-move-server server)) - (nnmail-expiry-target-group nnmail-expiry-target group)))) + (if (and (not (functionp nnmail-expiry-target)) + (gnus-server-equal (gnus-group-method nnmail-expiry-target) + (gnus-server-to-method + (format "nnimap:%s" server)))) + ;; moving article within same server, speed it up... + (and (nnimap-possibly-change-group group) + (imap-message-copy (imap-range-to-message-set arts) + (gnus-group-short-name nnmail-expiry-target) + 'dontcreate nil nnimap-server-buffer)) + (with-temp-buffer + (dolist (art arts) + (nnimap-request-article art group server (current-buffer)) + ;; hints for optimization in `nnimap-request-accept-article' + (let ((nnimap-current-move-article art) + (nnimap-current-move-group group) + (nnimap-current-move-server server)) + (nnmail-expiry-target-group nnmail-expiry-target group))))) ;; It is not clear if `nnmail-expiry-target' somehow cause the ;; current group to be changed or not, so we make sure here. (nnimap-possibly-change-group group server))) --=-=-=--