summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-07 09:23:03 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-07 09:33:32 (GMT)
commit51f92c1a4f66f658b3c3b7f034bb8dd661a0d57d (patch)
tree3f8dbd23cb75bd86857d240d29454b9f0f1aaa04 /doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp
parentb63cfd1d90dfd8be70c49c409b4f6f1cca176735 (diff)
downloadQt-51f92c1a4f66f658b3c3b7f034bb8dd661a0d57d.zip
Qt-51f92c1a4f66f658b3c3b7f034bb8dd661a0d57d.tar.gz
Qt-51f92c1a4f66f658b3c3b7f034bb8dd661a0d57d.tar.bz2
Improve QUrl constructing performance by making empty URLs have d==0.
One major cost is that QUrl::d is never 0 (even for default constructor). While this simplifies the code, it has a real performance impact, since QUrlPrivate is quite expensive to create (14 QString/QByteArray members, plus others). In a simple test of the QML flickr demo, 1 in 3 QUrlPrivate objects that were created were never used before being deleted. According to callgrind, this reduces cost of QUrl+QUrlPrivate by 25% in the case tested. Patch-by: Warwick Allison Reviewed-by: Thiago Macieira
Diffstat (limited to 'doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp')
0 files changed, 0 insertions, 0 deletions