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

QQmlPropertyMap inserting new properties is O(N^2)

    XMLWordPrintable

    Details

      Description

      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

        Attachments

        1. 1.png
          1.png
          9 kB
        2. test.zip
          0.6 kB

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

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

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes