Le February 11, 2007 14:39, Martijn Klingens a écrit : > Hiya, > > In 3.5 branch, ChatMessagePart::formatStyleKeywords is a pretty expensive > method. It's called for every message. But worse, it's called a *LOT* when > the style changes, and this happens whenever a buddy icon changes. > > A changing buddy icon on an open chat with a few hundred KopeteMessages is > horribly expensive. formatStyleKeywords is called again for each of them. > > Callgrinding Kopete I came up with the attached patch. Simple as it is, it > already makes the method about 20% faster by killing most calls to the > expensive QColor::name() and the conversion from a string to a color. > > Additionally, replacing QString::arg() with a simple append also saves some > cycles. > > There is one very big fish in there that I am looking at now, but these > optimizations should already help. Ok to commit? > > Any taker for porting to 4.0?
Looks fine for me -- Michaël Larouche KDE developer working on Kopete, Gamefu(KDE), Solid...on dial-up :P -------------------------------------- Website: http://www.tehbisnatch.org/ MSN: [EMAIL PROTECTED] IRC: irc.freenode.org/DarkShock Jabber/email: [EMAIL PROTECTED]
pgpfpJUemq8p6.pgp
Description: PGP signature
_______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel