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

QQmlPropertyMap inserting new properties is O(N^2)

XMLWordPrintable

    • macOS
    • b64f8dacae36fca948933cf56498d5e4ad3e2a07 f1410debc7905e704b6ed16ae345e43765ef8ef5

      QQmlPropertyMap::insert(const QString &key, const QVariant &value) has O(N^2) complexity when inserting new properties. Feels like it should be linear or O(n log n) at least. This leads to UI freezes for a significant amount of time.

      My numbers are (i7-2760 2400 MHz):
      500 301 ms
      1000 1206 ms
      1500 2689 ms
      2000 4759 ms
      2500 7546 ms (UI is blocked for 7 secs here!)

      Upd:
      Found this one marked as done – https://bugreports.qt.io/browse/QTBUG-32720
      Looks like it's a regression

        1. 1.png
          9 kB
          Sam Davydov
        2. test.zip
          0.6 kB
          Sam Davydov
        For Gerrit Dashboard: QTBUG-57792
        # Subject Branch Project Status CR V

            ulherman Ulf Hermann
            samdavydov Sam Davydov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes