Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv15731/src/mail

Modified Files:
        MailFolderCmn.cpp 
Log Message:
ping folders a bit less often

Index: MailFolderCmn.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCmn.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -b -u -2 -r1.89 -r1.90
--- MailFolderCmn.cpp   27 Apr 2002 21:56:18 -0000      1.89
+++ MailFolderCmn.cpp   10 May 2002 14:14:25 -0000      1.90
@@ -298,4 +298,10 @@
 
          m_mf->Ping();
+
+         // restart the timer after Ping() has completed: this ensures that
+         // we're not going to ping the folder too often if accessing it took a
+         // lot of time (i.e. if Ping() takes longer than our timer interval,
+         // we'd keep pinging all the time and never do anything else)
+         Start();
       }
    }
@@ -518,5 +524,9 @@
             if ( delay > 0 )
             {
-               Checkpoint(); // flush data immediately
+               // don't do it any more as IMAP CHECK command is *slow* and we
+               // are calling it constantly when the folder is removed
+               // from/added back to gs_MailFolderCloser
+               //
+               // Checkpoint(); // flush data immediately
 
                // this calls IncRef() on us so we won't be deleted right now
@@ -1231,5 +1241,7 @@
 
       if ( interval > 0 ) // interval of zero == disable ping timer
-         m_Timer->Start(interval);
+      {
+         m_Timer->Start(interval, TRUE /* one shot */);
+      }
    }
 }


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to