Version: (using KDE KDE 3.1) Installed from: SuSE RPMs OS: Linux Hello! When clicking on a message that has an attachemnt of about 4MB kmail takes no less than 28 seconds to display the message. During these 28 seconds the progressbar shows 0%. After 28 seconds the progress-bar goes in less than one second from 0% to 100% and the message is displayed. I've looked with a top and during these 28 seconds there are two processes in top consuming each about 50% of the CPU: kmail and kdeinit. This suggest that my CPU (Pentium III 700 MHz) is too slow for Kmail. However when using mozilla, the mail display goes much faster and the 10Mbit network is the bottleneck, not the CPU. This problem doesn't happend only with a specific message, all the messages that are relatively big are very slow to display. The IMAP server is Cyrus. Nicolae
I can confirm this behaviour. Retrieving a 36,9MB (!) mail from an IMAP Server behind a DSL connection becomes so slow, that the DSL line (1MBit/s) is NOT the bottleneck. After clicking on the mail CPU usage ramps up slowly (over the course of 10-15 seconds) until it reaches 100% at which point the network transfer slowly starts to slow down until it reaches approximately 20K/s (Normally I can transfer with ca. 120K/s from the IMAP server). When the download itself has finished KMail needs another 3 minutes until the message can be displayed (NB: AMD Thunderbird 1200, 512MB RAM, 1GB swap, no swapping during the whole process, and the machine is otherwise idle), and scrolling in the message (no attachment, the mail has a 36MB Body) pegs the CPU to 100% for several seconds at a time. Note: Mozilla does not really do any better, it degrades even further... Granted: this is not the average eMail, and does not happen often, but maybe it is possible to somehow speed this up? System: KDE 3.1.1 on Debian SID Patrick
Just wanted to report the same bug, with some additional infos. The time is spent in the following backtrace: realloc() QGArray::resize(unsigned, Optimization = MemOptim) QGArray::resize(unsigned) QBuffer::writeBlock KMFolderImap::slotSimpleData On my system (CVS HEAD), slotSimpleData receives the mail in 8192 byte chunks. QBuffer::writeBlock copies the complete data on every call, resulting in an O(n!) workload with n being equivalent to mail size.
I'm experiencing similar performance problems. The display of mails with large attachements is very slow, other mail clients, e.g. sylhpeed are much faster. If I copy the mail from the IMAP server to a local mail directory the displaying of the mails is as fast as expected. The network performance to the mail server should not be a problem. Using scp to transfer large files from the mailserver to my machine results in transfer speeds of about 3Mb/sec. IMAP server is UW IMAP 2002.325. KMail Version is 1.5.1 (on KDE 3.1.1a, on Gentoo Linux, Intel x86).
Load attachments on demand (kde 3.2) fixes this