Bug 33873 - [qt] Make KURL to QUrl conversion faster
Summary: [qt] Make KURL to QUrl conversion faster
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks: 34208
  Show dependency treegraph
 
Reported: 2010-01-19 16:36 PST by Holger Freyther
Modified: 2010-01-28 03:54 PST (History)
0 users

See Also:


Attachments
Use QString::toUtf8 instead of WebCore::TextCodec (2.09 KB, patch)
2010-01-19 16:43 PST, Holger Freyther
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Freyther 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.
Comment 1 Holger Freyther 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.
Comment 2 Holger Freyther 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.
Comment 3 Eric Seidel (no email) 2010-01-21 16:52:25 PST
Comment on attachment 46960 [details]
Use QString::toUtf8 instead of WebCore::TextCodec

OK.
Comment 4 Holger Freyther 2010-01-28 03:54:44 PST
Landed in r53995. Thanks.