Revision 07cf6ec...

Go back to digest for 10th July 2011

Optimization in Graphics

Marcel Wiesweg committed changes in [digikam] /:

Drawing speed optimization: reduce use of squeezedText

A very significant of the drawing time in the main view is spent in
calculating text widths. Apparently, this is an expensive operation
- do not use squeezedText for the small texts we draw. We do not gain
much from having the shortened version
- use Qt's built-in elidedText instead of the custom algorithm which
computes the width very often
- in DigikamApp, use a font metrics to initialize the font engine
I had a profiling result which used lots of CPU in the initialization

File Changes

Modified 3 files
  •   digikam/main/digikamapp.cpp
  •   libs/widgets/common/ditemdelegate.cpp
  •   libs/widgets/common/itemviewimagedelegate.cpp
3 files changed in total