Review Request: optimize kcolorscheme consting time: avoid calculating luma for the same colors multiple times

Nick Shaforostoff shafff at ukr.net
Tue Dec 6 17:53:33 GMT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103348/
-----------------------------------------------------------

Review request for kdelibs.


Description
-------

pretty straightforward and small optimization of kde apps startup time:
avoid calculating luma for the same colors multiple times.

callgrind shows it is called 4503 times
instead of 12087 at startup of kwrite, which is 1.5%.


Diffs
-----

  kdeui/colors/kcolorutils.cpp efe8cdd 

Diff: http://git.reviewboard.kde.org/r/103348/diff/diff


Testing
-------

kwrite starts fine with the new kdeui lib


Thanks,

Nick Shaforostoff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20111206/fa8f5094/attachment.htm>


More information about the kde-core-devel mailing list