[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] Cache returned KIconLoader pixmaps in 4.5.2
From: Michael Pyne <mpyne () kde ! org>
Date: 2010-09-14 2:36:53
Message-ID: 20100914023704.1B3A1AABC6 () postalmail-a8 ! g ! dreamhost ! com
[Download RAW message or body]
On Monday, September 13, 2010 20:37:11 Ingo Klöcker wrote:
> Maybe not, but something like
> QString("%1_%2_%3").arg(name).arg(size).arg(overlays.join("_"))
> is completely braindead because it's horribly slow.
>
> What about
> return ( group == KIconLoader::User ? QLatin1Literal("$kicou_") :
> QLatin1Literal("$kico_") ) % name
> % QLatin1Char('_')
> % QString::number(size)
> % QLatin1Char('_')
> % overlays.join("_")
> % ( group >= 0 ? mpEffect.fingerprint(group, state) :
> QString("noeffect") ); ?
I actually didn't know about QStringBuilder, so thanks for introducing me to
that and the new operator% for QString that it magically enables.
Anyways, your patch reduces execution time in Matthias's benchmark by 8% for
me, and the makeCacheKey portion of looking up an entry in a warm cache goes
from 34% of loadIcon to a "mere" 13% so it looks good. I'll go ahead and
commit tonight, and given there's been no objections to backporting the patch
I first mailed about, I'll backport that tonight as well.
Regards,
- Michael Pyne
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic