Changeset 1282:9aa027ec5ea8 for buffy.c

Show
Ignore:
Timestamp:
1999-09-12 00:45:30 (9 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

The attached patch (imap-turbocharge.diff):

* changes mutt_buffy_check to only poll the selected folder when it

is opened, not all mailboxes (unless the timeout has expired).
This is a noticeable win if you have a few IMAP mailboxes.

* sets the default checkinterval to 60 seconds from 0. Things are

much much slower with 0.

* makes some cosmetic renames

* moves lots of generic imap stuff into a separate file, imap/util.c

* abstracts the process of sending a command to an IMAP server a bit

better (lots more to do here, though).

* moves the message-set creation code used by the new fastdelete

code into its own function, since it is generally useful.

* implements server-side copy of messages. Tagged messages are

copied in one command, thanks to the message-set function. Speedy!

(From: Brendan Cully; modifications by tlr.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • buffy.c

    r1124 r1282  
    233233  int do_imap_check = 1; 
    234234 
    235   if (ImapCheckTime) 
     235  if (ImapCheckTimeout) 
    236236  { 
    237237    time_t now = time (NULL); 
    238     if (!force && (now - last_imap_check < ImapCheckTime)) 
     238    if (now - last_imap_check < ImapCheckTimeout) 
    239239      do_imap_check = 0; 
    240240    else 
     
    349349#ifdef USE_IMAP 
    350350      case M_IMAP: 
    351         /* poll on do_imap_check, else return cached value */ 
    352         if (do_imap_check) 
     351        /* poll on do_imap_check, else return cached value. 
     352         * If the check is forced (eg on mailbox open), check only current 
     353         * folder */ 
     354        if (do_imap_check || (force && !mutt_strcmp (Context->path, 
     355          tmp->path))) 
    353356        { 
    354357          tmp->new = 0; 
    355           if (imap_buffy_check (tmp->path) > 0) 
     358          if (imap_mailbox_check (tmp->path, 1) > 0) 
    356359          { 
    357360            BuffyCount++;