[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: Displaying large message takes loooong
From:       Michael Brade <brade () kde ! org>
Date:       2002-10-15 13:59:02
[Download RAW message or body]

On Tuesday 15 October 2002 14:32, Michael Brade wrote:
> On Monday 14 October 2002 14:00, Don Sanders wrote:
> > I also get the impression that the slowness here is possibly due to a
> > text or html attachment being shown inline, is this the case?
>
> Just to let you know, this is not the case. I can reproduce the problem
> with *every* mail that has a base64 attachment bigger than 1 MB (well, it
> is slow with 500kb as well but not *that* slow). A mail with 15 MB takes at
> least 15 minutes on my PII400. However, I don't know the exact value as I
> killed KMail then...
Just tried Don's suggestion to comment out the 
 result = result.replace
but that didn't help too much. Further investigation shows that it's also 
kio_imap4's fault, here's the backtrace:

for kio_imap4:

#0  0x40628d03 in malloc (bytes=1092198408)
    at /usr/src/KDE/kde-cvs/kdelibs/kdecore/malloc/malloc.c:3710
#1  0x40c8e6e0 in __DTOR_END__ () from /opt/qt-3.1/lib/libqt-mt.so.3
#2  0x40abdf96 in QGArray::resize () from /opt/qt-3.1/lib/libqt-mt.so.3
#3  0x40aace9a in QBuffer::writeBlock () from /opt/qt-3.1/lib/libqt-mt.so.3
#4  0x41166477 in IMAP4Protocol::parseRead (this=0x805c570, 
buffer=@0xbfffef4c, len=15460308,
    relay=15460308) at 
/usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imap4.cc:531
#5  0x4117ba13 in imapParser::parseLiteral (this=0x805c5c8, 
inWords=@0xbffff0f4, relay=true)
    at /usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imapparser.cc:1498
#6  0x41179791 in imapParser::parseFetch (this=0x805c5c8, value=1774, 
inWords=@0xbffff0f4)
    at /usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imapparser.cc:1225
#7  0x41173dd0 in imapParser::parseUntagged (this=0x805c5c8, 
result=@0xbffff0f4)
    at /usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imapparser.cc:296
#8  0x4117a156 in imapParser::parseLoop (this=0x805c5c8)
    at /usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imapparser.cc:1340
#9  0x4116324f in IMAP4Protocol::get (this=0x805c570, _url=@0xbffff2e8)
    at /usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imap4.cc:245
#10 0x4016cefb in KIO::SlaveBase::dispatch (this=0x805c570, command=67, 
data=@0xbffff430)
    at /usr/src/KDE/kde-cvs/kdelibs/kio/kio/slavebase.cpp:968
#11 0x4116bf18 in IMAP4Protocol::dispatch (this=0x805c570, command=67, 
data=@0xbffff430)
    at /usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imap4.cc:1094
#12 0x40167e0a in KIO::SlaveBase::dcopClient (this=0x805c570)
    at /usr/src/KDE/kde-cvs/kdelibs/kio/kio/slavebase.cpp:232
#13 0x4116169e in kdemain (argc=4, argv=0x805bbf8)
    at /usr/src/KDE/kde-cvs/kdebase/kioslave/imap4/imap4.cc:105
#14 0x0804cdb6 in launch (argc=4, _name=0x805b924 "kio_imap4", args=0x805b993 
"", cwd=0x0, envc=0,
    envs=0x805b997 "", reset_env=false, tty=0x0, avoid_loops=false, 
startup_id_str=0x804ffd6 "0")
    at /usr/src/KDE/kde-cvs/kdelibs/kinit/kinit.cpp:545
#15 0x0804db57 in handle_launcher_request (sock=-1)

and for kmail:

#0  0x40aa75c5 in realloc (m=0x4179d008, bytes=10356292)
    at /usr/src/KDE/kde-cvs/kdelibs/kdecore/malloc/malloc.c:4102
#1  0x40f60f96 in QGArray::resize () from /opt/qt-3.1/lib/libqt-mt.so.3
#2  0x40f4fe9a in QBuffer::writeBlock () from /opt/qt-3.1/lib/libqt-mt.so.3
#3  0x08186549 in KMFolderImap::slotSimpleData ()
#4  0x081895f3 in KMFolderImap::qt_invoke ()
#5  0x40d44b29 in QObject::activate_signal () from 
/opt/qt-3.1/lib/libqt-mt.so.3
#6  0x405c0acd in KIO::TransferJob::data (this=0x891fad8, t0=0x891fad8, 
t1=@0xbffff134)
    at jobclasses.moc:728
#7  0x405b05e1 in KIO::TransferJob::slotData (this=0x891fad8, 
_data=@0xbffff134)
    at /usr/src/KDE/kde-cvs/kdelibs/kio/kio/job.cpp:737
#8  0x405c0fe3 in KIO::TransferJob::qt_invoke (this=0x891fad8, _id=18, 
_o=0xbfffef44)
    at jobclasses.moc:807
#9  0x40d44b29 in QObject::activate_signal () from 
/opt/qt-3.1/lib/libqt-mt.so.3
#10 0x405a5228 in KIO::SlaveInterface::data (this=0x87bdcc0, t0=@0xbffff134) 
at slaveinterface.moc:195
#11 0x405a23f0 in KIO::SlaveInterface::dispatch (this=0x87bdcc0, _cmd=100, 
rawdata=@0xbffff134)
    at /usr/src/KDE/kde-cvs/kdelibs/kio/kio/slaveinterface.cpp:246
#12 0x405a1f90 in KIO::SlaveInterface::dispatch (this=0x87bdcc0)
    at /usr/src/KDE/kde-cvs/kdelibs/kio/kio/slaveinterface.cpp:191
#13 0x4059f724 in KIO::Slave::gotInput (this=0x87bdcc0)
    at /usr/src/KDE/kde-cvs/kdelibs/kio/kio/slave.cpp:221

The 100% CPU is shared between kmail and kio_imap4, both need about 47%.

> What about just looking at the type of attachment without parsing it? Then,
> if it is text or html, show it, otherwise skip it. If you don't save it to
> disk, then this should be possible, no?
Or adapted to my investigation, why not leave the attachments on the IMAP 
server until one clicks them?

-- 
Michael Brade;                 KDE Developer, Student of Computer Science
  |-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
  °--web: http://www.kde.org/people/michaelb.html

KDE 3: The Next Generation in Desktop Experience


[Attachment #3 (application/pgp-signature)]
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic