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

List:       kde-core-devel
Subject:    Re: [patch] KConfig: Efficient iterators
From:       "David Jarvie" <djarvie () kde ! org>
Date:       2008-04-22 13:22:26
Message-ID: 54230.134.146.0.41.1208870546.squirrel () www ! sensical ! net
[Download RAW message or body]

On Monday 21 April 2008 18:44, Jarosław Staniek wrote:
>
> For review
> I have encountered that every call took more than 1 second and ~100% of
> CPU on my box, in debugging session for KMail (win32/msvc). Strange.
>
> Use KEntryMap::ConstIterator instead of foreach with entryMap.keys().
>
> Infinite loops may take just one second on your box too, _but_ better to
> optimize them :)

If foreach has such a bad impact on performance, I suggest adding comments
about this into the code, just in case anybody in future is tempted to
change the code back to foreach.

-- 
David Jarvie.
KAlarm author & maintainer.
http://www.astrojar.org.uk/kalarm

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

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