From 16bd9a814dd3d8b3f6998fdf81293a6482fd7caa Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Thu, 19 Jul 2007 22:19:45 +0000 Subject: [PATCH] don't flush to disk in header only download mode; this speeds up header only mode quite a bit, patch by hyc@symas.com, r/sr=bienvenu --- mailnews/local/src/nsPop3Sink.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mailnews/local/src/nsPop3Sink.cpp b/mailnews/local/src/nsPop3Sink.cpp index bc56942b0d8..f64df63fae6 100644 --- a/mailnews/local/src/nsPop3Sink.cpp +++ b/mailnews/local/src/nsPop3Sink.cpp @@ -784,7 +784,9 @@ nsPop3Sink::IncorporateComplete(nsIMsgWindow *aMsgWindow, PRInt32 aSize) nsresult rv = WriteLineToMailbox(MSG_LINEBREAK); if (NS_FAILED(rv)) return rv; - rv = m_outFileStream->Flush(); //to make sure the message is written to the disk + // aSize is only set for partial messages. Skip the flush for partials. + if (!aSize) + rv = m_outFileStream->Flush(); //to make sure the message is written to the disk if (NS_FAILED(rv)) return rv; NS_ASSERTION(m_newMailParser, "could not get m_newMailParser"); if (m_newMailParser)