RESOLVED FIXED 33873
[qt] Make KURL to QUrl conversion faster
https://bugs.webkit.org/show_bug.cgi?id=33873
Summary [qt] Make KURL to QUrl conversion faster
Holger Freyther
Reported 2010-01-19 16:36:03 PST
Reloading google.com/news with a full font cache (no more calls to font cache) spend about 1.8% of the time in KURL -> QUrl conversion. The two call sites are from the FrameLoaderClientQt asking for the userAgentForUrl and in the ResourceHandleQt.cpp converting the ResourceRequest to a QNetworkRequest and using the URL.
Attachments
Use QString::toUtf8 instead of WebCore::TextCodec (2.09 KB, patch)
2010-01-19 16:43 PST, Holger Freyther
eric: review+
Holger Freyther
Comment 1 2010-01-19 16:43:14 PST
Created attachment 46960 [details] Use QString::toUtf8 instead of WebCore::TextCodec Adopt the WebCore::String in a QString and use the Qt QString::toUtf8 method instead of going through WebCore::TextCodec -> QTextCodec and copying the buffer around.
Holger Freyther
Comment 2 2010-01-19 16:49:38 PST
Another way to make the KURL to QUrl conversion faster is to avoid going to a QByteArray and using QUrl::fromEncoded all together. We would have to call setPath, setHost, setUser, setPassword and see if that is any faster.
Eric Seidel (no email)
Comment 3 2010-01-21 16:52:25 PST
Comment on attachment 46960 [details] Use QString::toUtf8 instead of WebCore::TextCodec OK.
Holger Freyther
Comment 4 2010-01-28 03:54:44 PST
Landed in r53995. Thanks.
Note You need to log in before you can comment on or make changes to this bug.