Bug 305195 - panning is slow during tracking (regression of commit bf31bccb53eb34f6b9d40749edcdcf358c4bde1b)
Summary: panning is slow during tracking (regression of commit bf31bccb53eb34f6b9d4074...
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Thibaut Gridel
URL:
Keywords: investigated, regression, reproducible
Depends on:
Blocks:
 
Reported: 2012-08-15 12:44 UTC by Bernhard Beschow
Modified: 2013-04-07 07:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Beschow 2012-08-15 12:44:12 UTC
When tracking is enabled, panning is slow since commit bf31bccb53eb34f6b9d40749edcdcf358c4bde1b. I could reproduce this on the N950 and in the desktop version.

Reproducible: Always

Steps to Reproduce:
1. Start the Qt-Desktop version of Marble
2. Create a route
3. Simulate the route (select "Current Location"->"Position Tracking"->"Current Route" in the left pane)
4. Pan the map
Actual Results:  
Panning feels slow.

Expected Results:  
Panning should feel fast, as before the commit.
Comment 1 Dennis Nienhüser 2012-08-16 06:53:04 UTC
Sorry, which commit? I get
$ git show bf31bccb53eb34f6b9d40749edcdcf358c4bde1b
fatal: bad object bf31bccb53eb34f6b9d40749edcdcf358c4bde1b
Comment 2 Dennis Nienhüser 2012-08-16 06:54:23 UTC
git fetch helps on outdated systems. Sorry for the bugspam.
Comment 3 Bernhard Beschow 2012-08-17 11:03:47 UTC
Here is a backtrace tracking down the source of the performance regression:

#0  Marble::PlacemarkLayout::setCacheData (this=0x827f204) at /home/shentey/Projekte/marble/src/src/lib/PlacemarkLayout.cpp:270
#1  Marble::PlacemarkLayout::qt_static_metacall (_o=0x827f204, _id=-1226085632, _a=0xbfffe4c4, _c=<optimized out>) at /home/shentey/Projekte/marble/build-qt/src/lib/PlacemarkLayout.moc:74
#2  QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib/libQtCore.so.4
#3  QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&) () from /lib/libQtCore.so.4
#4  ?? () from /lib/libQtGui.so.4
#5  QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib/libQtCore.so.4
#6  QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&) () from /lib/libQtCore.so.4
#7  ?? () from /lib/libQtGui.so.4
#8  QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib/libQtCore.so.4
#9  QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&) () from /lib/libQtCore.so.4
#10 KDescendantsProxyModelPrivate::sourceDataChanged (this=0x8130bb8, topLeft=..., bottomRight=...) at /home/shentey/Projekte/marble/src/src/lib/kdescendantsproxymodel.cpp:977
#11 KDescendantsProxyModel::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=0xbfffe9b4, _c=<optimized out>) at /home/shentey/Projekte/marble/build-qt/src/lib/kdescendantsproxymodel.moc:82
#12 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib/libQtCore.so.4
#13 QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&) () from /lib/libQtCore.so.4
#14 Marble::GeoDataTreeModel::updateFeature (this=0x8235230, feature=0x8977568) at /home/shentey/Projekte/marble/src/src/lib/GeoDataTreeModel.cpp:604
#15 Marble::PositionTrackingPrivate::updatePosition (this=0x826e460) at /home/shentey/Projekte/marble/src/src/lib/PositionTracking.cpp:89

In essence, the call to GeoDataTreeModel::updateFeature() in PositionTrackingPrivate::updatePosition() causes a complete cache reload in PlacemarkLayout::setCacheData(). Given that only one out of over 18k placemarks changed, this seems a bit much of an overhead. Couldn't this be avoided somehow?
Comment 4 Thibaut Gridel 2013-01-15 21:00:28 UTC
Git commit 7f1f987554d3743eefb9c85155533f7aed729399 by Thibaut Gridel.
Committed on 15/01/2013 at 21:46.
Pushed by tgridel into branch 'master'.

GeometryLayer: fine-tune the performance of treemodel signals

M  +25   -4    src/lib/GeoGraphicsScene.cpp
M  +4    -3    src/lib/GeoGraphicsScene.h
M  +5    -0    src/lib/geodata/graphicsitem/ScreenOverlayGraphicsItem.cpp
M  +2    -0    src/lib/geodata/graphicsitem/ScreenOverlayGraphicsItem.h
M  +65   -8    src/lib/layers/GeometryLayer.cpp
M  +4    -1    src/lib/layers/GeometryLayer.h

http://commits.kde.org/marble/7f1f987554d3743eefb9c85155533f7aed729399
Comment 5 Thibaut Gridel 2013-01-15 21:00:28 UTC
Git commit 5dcb9a11f86866a8397fc7acc7ebee3a5bd91731 by Thibaut Gridel.
Committed on 15/01/2013 at 21:52.
Pushed by tgridel into branch 'master'.

PlacemarkLayout: fine-tune the performance of treemodel signals

M  +5    -6    src/lib/GeoDataTreeModel.cpp
M  +42   -19   src/lib/PlacemarkLayout.cpp
M  +3    -1    src/lib/PlacemarkLayout.h

http://commits.kde.org/marble/5dcb9a11f86866a8397fc7acc7ebee3a5bd91731