Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-76950

Removing a large amount of QML Map items takes a long time

    XMLWordPrintable

Details

    • Windows
    • 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?

      Attachments

        1. 76950_SlowClearMapItems.tar.gz
          2 kB
          Paolo Angelelli
        2. main.cpp
          1 kB
          Pieter Verberck
        3. main.qml
          0.7 kB
          Pieter Verberck
        4. qml.qrc
          0.1 kB
          Pieter Verberck
        5. test.pro
          0.2 kB
          Pieter Verberck
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            paangele Paolo Angelelli
            pieterverberck Pieter Verberck
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes