Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
Description
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
Attachments
Issue Links
- relates to
-
QTBUG-6708 Cut down on the usage of QUrl::toEncoded as it shows up in the profile of starting jobs.
- Open