From e0280048bcd9e602fb5073bc5f5526a5dffd1886 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 16 Jan 2015 18:50:28 -0200 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveprofileitem.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index 7531b2acb..490f045fd 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -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())); }