Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.4
-
None
-
-
2bb07804f32e0c9cc7948a5cff0bcef81ae9d8c9 (qt/qtlocation/5.12) 60925ff5d4aaf211090b246618b492cf177cf21d (qt/qtlocation/5.13)
Description
I add ~25000 MapPolyline's to a QML Map.
Instantiating these 25000 items (using a model) only takes a few seconds.
When calling the slot clearMapItems of the QML Map, the operation takes about 2 to 3 minutes to complete.
This is the top of the callstack where the minutes are being spent:
Qt5Core.dll!QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection * c, const QObject * receiver, int method_index, void * * slot, QMutex * senderMutex, QMetaObjectPrivate::DisconnectType disconnectType) Line 3390 C++
Qt5Core.dll!QMetaObjectPrivate::disconnect(const QObject * sender, int signal_index, const QMetaObject * smeta, const QObject * receiver, int method_index, void * * slot, QMetaObjectPrivate::DisconnectType disconnectType) Line 3458 C++
Qt5Core.dll!QObject::disconnect(const QObject * sender, const char * signal, const QObject * receiver, const char * method) Line 3032 C++
Qt5Location.dll!QDeclarativeGeoMapItemBase::setMap(QDeclarativeGeoMap * quickMap, QGeoMap * map) Line 131 C++
Qt5Location.dll!QDeclarativePolylineMapItem::setMap(QDeclarativeGeoMap * quickMap, QGeoMap * map) Line 769 C++
> Qt5Location.dll!QDeclarativeGeoMap::removeMapItem_real(QDeclarativeGeoMapItemBase * ptr) Line 1981 C++
Qt5Location.dll!QDeclarativeGeoMap::clearMapItems() Line 2011 C++
Most of the time seems to being spent disconnecting each QML Polyline from the QML Map. Can't this be optimized?