Subject: Re: Pine slowdown since 4.60

From: Steve Hubert <[email-masked]>
Date: Tue, 2 Nov 2004 10:27:56 -0800 (PST)

On Mon, 1 Nov 2004, Steve Huston wrote:

> On Monday, Nov 1, 2004, at 19:12 US/Eastern, Steve Hubert wrote:
> > If what Eduardo talks about is the problem, take a look at the hidden pine
> > feature "save-aggregates-copy-sequence" and its help text.
> 
> That does seem to be the problem, but turning on that option doesn't make a
> difference.  Also, I checked and that option existed in 4.44 (at least it's in
> the config screen, since I have the option to display hidden options turned
> on), and in that one it's turned off anyway but still seems to go much faster.

That sort of suggests that that might not be the problem. Did you try the 
help.c patch I posted? That still seems like a reasonable idea to me. 
Thanks.

Steve

---

From: Steve Huston <[email-masked]>
Date: Tue, 2 Nov 2004 14:32:05 -0500 (EST)

> help.c patch I posted? That still seems like a reasonable idea to me.

I did not try that patch yet, however you described that patch as fixing the
problem of pine getting slower with time (I have seen that problem also) -
this happens right away.

With Eduardo showing me right where the save happens in the code, I found the
differences between 4.44 and 4.61 that point to what's going on.  4.44 seems
to have paid no attention to any keywords attached to messages, while 4.61
makes sure that if there are any, they are copied over with the mail properly.
See pine4.44/pine/mailcmd.c:2738-2746 vs pine4.61/pine/mailcmd.c:3726-3762 for
the relevant code.  In 4.44, even with the option off, I get through the if
statement at 2738 (because of the second OR'd clause), and the next step is to
set oseq to the list of messages.  In 4.61, I still get through the if
statement, but the next step is to see if any messages have a keyword, and if
so to drop the idea of a block copy and instead do each message individually.
Since Apple's Mail.app helpfully flags all my messages with the keyword
"NotJunk", I fail the keyword test and have to do single copies.

So it looks like this problem is not a bug, but built in by design to avoid
overlooking user-set keywords on messages.  Not sure what could be done about
it, except perhaps to put in an option to skip the keyword test, assuming that
the IMAP server would DTRT in copying the messages server-side - I don't know
how safe an assumption that is, however, and am willing to bet that it is in
fact far from safe :>

-- 
Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
  Princeton University  |    ICBM Address: 40.346525   -74.651285
    126 Peyton Hall     |"On my ship, the Rocinante, wheeling through
  Princeton, NJ   08544 | the galaxies; headed for the heart of Cygnus,
    (609) 258-7375      | headlong into mystery."  -Rush, 'Cygnus X-1'

---

From: Steve Hubert <[email-masked]>
Date: Tue, 2 Nov 2004 12:06:27 -0800 (PST)

Indeed, you are correct. The presence of keywords does cause the message 
by message copy to happen because the IMAP spec did not say that keywords 
should be preserved and some servers don't, in fact, preserve the 
keywords.

Steve

---

From: NM Public <[email-masked]>
Date: Wed, 3 Nov 2004 09:39:40 +0000

> should be preserved and some servers don't, in fact, preserve the

When you say "the presence of keywords," do you mean in the 
selected messages that are being copied or *anywhere* in the 
current mailbox. For example, if the selected messages contained 
no keywords but some unselected messages in that box did, would a 
message-by-message copy happen?

BTW, I'm writing about Pine and keywords here:

  Setting Up Keywords (Labels)
  <http://www.ii.com/internet/messaging/pine/pc/#keywords>

  Keyword Wishes
  <http://www.ii.com/internet/messaging/pine/#wishKeywords>

Feedback is welcome!
Nancy

-- 
Infinite Ink: <http://www.ii.com/>
IMAP Service Providers: <http://www.ii.com/internet/messaging/imap/isps/>
All About Pine: <http://www.ii.com/internet/messaging/pine/>
Power Pine: <http://www.ii.com/internet/messaging/pine/pc/>

---

From: Eduardo Chappa <[email-masked]>
Date: Wed, 3 Nov 2004 09:15:23 -0800 (PST)

*** NM Public ([email-masked]) wrote in the pine-info list today:

:) On 2 Nov 2004 Steve Hubert ([email-masked]) wrote:
:) > Indeed, you are correct. The presence of keywords does cause the 
:) > message by message copy to happen because the IMAP spec did not say 
:) > that keywords should be preserved and some servers don't, in fact, 
:) > preserve the keywords.
:) 
:) When you say "the presence of keywords," do you mean in the selected 
:) messages that are being copied or *anywhere* in the current mailbox. 
:) For example, if the selected messages contained no keywords but some 
:) unselected messages in that box did, would a message-by-message copy 
:) happen?

It only happens if at least one selected message contains a keyword. Non 
selected messaged do not influence this.

-- 
Eduardo
Patches/Help: http://www.math.washington.edu/~chappa/pine/
XML/RSS feed: http://www.math.washington.edu/~chappa/pine/pine.xml

---

From: NM Public <[email-masked]>
Date: Fri, 5 Nov 2004 08:46:31 +0000 (GMT)

> selected messaged do not influence this.

Thanks Eduardo. I just updated my Power Pine page so it includes 
this in the "Speed Tips" section:

--- begin tip ---
11. Yet another hidden feature is save-aggregates-copy-sequence. 
Setting this, which is the default, "may save network traffic 
when the source and destination folders are on the same IMAP 
server." I prefer to unset this so that the order of messages is 
preserved when I do an aggregate save. Note that, as discussed 
here and here, this feature has no effect if keywords are present 
in the messages that are being copied.
--- end tip ---

This and the other speed tips are here:

  <http://www.ii.com/internet/messaging/pine/pc/#speed>

As always, feedback is welcome!
Thanks,
Nancy