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

QUrl performance improvements

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.0.0
    • None
    • Core: URL Handling
    • None

      Url handling in QML seems to take a disproportionate amount of time - in profiling (via callgrind) several examples, url handling has taken 3-8% of the instructions.

      One good example showing url impact is samegame - clicking the new game button causes a lot of url operations, which I estimate are taking close to 50ms total. This time is spent in:

      • constructing urls from strings
      • resolving relative urls against the component's base url
      • calling toLocalFile
      • the equality operator

      Most of these costs are 'once-off' per url (and quite fast for subsequent calls); its the once-off costs that we need to be further optimized to improve component creation/initialization costs. (we have tried to work around performance issues whenever possible, sharing urls, etc)

      commit 2c9d1ac6fb274d4b301a3fa496c01c21b497a49d introduces a basic set of QUrl benchmarks.

      I have noticed in KDE 4 applications that QUrl::operator==() is taking a disproportionate amount of time:

      The url are normalized before being compared, which is a quite expensive operation

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

            shkearns Shane Kearns
            mgoetz Markus Goetz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes