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

QQmlPropertyMap inserting new properties is O(N^2)

    XMLWordPrintable

Details

    • macOS
    • b64f8dacae36fca948933cf56498d5e4ad3e2a07 f1410debc7905e704b6ed16ae345e43765ef8ef5

    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

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes