Cache the complex items to give us a boost of speed

This cache give us a huge gain in performance, going from
17% moving the mouse frenetically to 9%, wich is quite acceptable.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-16 18:50:28 -02:00 committed by Dirk Hohndel
parent c9499baf22
commit e0280048bc

View file

@ -23,6 +23,7 @@
AbstractProfilePolygonItem::AbstractProfilePolygonItem() : QObject(), QGraphicsPolygonItem(), hAxis(NULL), vAxis(NULL), dataModel(NULL), hDataColumn(-1), vDataColumn(-1)
{
setCacheMode(DeviceCoordinateCache);
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
}