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

List:       kmail-devel
Subject:    Re: KMail blocks just before checking POP3 mailboxes
From:       Martijn Klingens <martijn () martijn ! homeip ! net>
Date:       2004-05-31 13:03:24
Message-ID: 200405311503.25352.martijn () martijn ! homeip ! net
[Download RAW message or body]

On Sunday 30 May 2004 23:39, Martijn Klingens wrote:
> The first blocking is after this kddebug output:
>
> kmail: processNextCheck, remaining 1
> kmail: processing next mail check for Local

I added kdDebugs there that also display the time and I think this says it 
all. I added kdDebugs to KMAcctExpPop::processNewMail() as follows:

----
    kdDebug( 5006 ) << QTime::currentTime().toString( Qt::TextDate )
                    << " " << k_funcinfo << "1.3" << endl;
    KConfig config( seenUidList );
    mUidsOfSeenMsgs = config.readListEntry( "seenUidList" );
    mUidsOfSeenMsgsDict.clear();
    mUidsOfSeenMsgsDict.resize( KMail::nextPrime( 
                                ( mUidsOfSeenMsgs.count() * 11 ) / 10 ) );
    for ( QStringList::ConstIterator it = mUidsOfSeenMsgs.begin();
          it != mUidsOfSeenMsgs.end(); ++it ) {
      // we use mUidsOfSeenMsgsDict to provide fast random access to the keys,
      // so we simply set the values to (const int *)1
      mUidsOfSeenMsgsDict.insert( *it, (const int *)1 );
    }
    kdDebug( 5006 ) << QTime::currentTime().toString( Qt::TextDate )
                    << " " << k_funcinfo << "1.4" << endl;
----

And the corresponding output:

----
kmail: processNextCheck, remaining 1
kmail: 14:56:47 [virtual void KMAcctMgr::processNextCheck(bool)] Processing 
next mail check for Server
kmail: 14:56:47 [virtual void KMAcctExpPop::processNewMail(bool)] 1
kmail: 14:56:47 [virtual void KMAcctExpPop::processNewMail(bool)] 1.1
kmail: 14:56:47 [virtual void KMAcctExpPop::processNewMail(bool)] 1.2
kmail: 14:56:47 [virtual void KMAcctExpPop::processNewMail(bool)] 1.3
kmail: 14:56:49 [virtual void KMAcctExpPop::processNewMail(bool)] 1.4
kmail: 14:56:49 [virtual void KMAcctExpPop::processNewMail(bool)] 2
----

So just this small part of the code that updates a QDict takes TWO SECONDS to 
run! (Between 1.3 and 1.4 in the output, i.e. the above code snippet.)

I'll try to tune this a bit further and add more debug, but the weather is 
improving outside so for now I'll first do some studying in the sun :)

-- 
Martijn
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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