Revision 1916098...

Go back to digest for 22nd June 2014

Optimization in Graphics

Milian Wolff committed changes in [kgraphviewer] /part:

Optimize: Cache string keys used for attribute lookup.

The string literal will otherwise be transformed into a QString,
which requires two allocations (QString's data and the actual
QChar* array in there). Saving this gives a noticeable boost, esp.
considering how often these methods are being called during painting.

File Changes

Modified 3 files
  • /part
  •   src/graphedge.cpp
  •   src/graphelement.cpp
  •   src/graphelement.h
3 files changed in total