WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
35589
Change the way of prefetching DNS to allow prefetching function to use full URL
https://bugs.webkit.org/show_bug.cgi?id=35589
Summary
Change the way of prefetching DNS to allow prefetching function to use full URL
José Millán Soto
Reported
2010-03-02 11:02:52 PST
At this moment the DNS prefetching is handled by a prefetchDNS function, which receives the host name which may be resolved. libsoup (HTTP library used by WebKit GTK) has a different approach: a function called soup_session_prepare_for_uri which takes the full URL as an argument, at now it only does DNS prefetching, but it will soon also have proxy resolution and prefetching (
https://bugzilla.gnome.org/show_bug.cgi?id=605065
). By having the full URL as an argument, the function can be expanded in the future (cache, etc.). However, as WebKit DNS prefetching function does only have the host name as a parameter, a fake URI (
http://hostname
) is sent to soup_session_prepare_for_uri, so the function cannot use the information given by the rest of the URI.
Attachments
ResourceHandle::prepareForURL
(8.38 KB, patch)
2010-03-02 11:26 PST
,
José Millán Soto
dglazkov
: review-
Details
Formatted Diff
Diff
ResourceHandle::prepareForURL
(8.66 KB, patch)
2010-03-10 10:03 PST
,
José Millán Soto
abarth
: review-
Details
Formatted Diff
Diff
ResourceHandle::prepareForURL
(8.15 KB, patch)
2010-03-15 07:59 PDT
,
José Millán Soto
no flags
Details
Formatted Diff
Diff
ResourceHandle::prepareForURL
(11.73 KB, patch)
2010-03-15 12:48 PDT
,
José Millán Soto
abarth
: review+
abarth
: commit-queue-
Details
Formatted Diff
Diff
ResourceHandle::prepareForURL
(11.71 KB, patch)
2010-03-16 09:26 PDT
,
José Millán Soto
abarth
: review+
abarth
: commit-queue-
Details
Formatted Diff
Diff
ResourceHandle::prepareForURL
(11.70 KB, patch)
2010-03-16 10:37 PDT
,
José Millán Soto
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
José Millán Soto
Comment 1
2010-03-02 11:26:11 PST
Created
attachment 49821
[details]
ResourceHandle::prepareForURL This patch adds a new static method to ResourceHandle, prepareForURL, which can be invoked when a URL may be requested. The default implementation of the method executes prefetchDNS. Soup prepareForURL implementation uses soup_session_prepare_for_uri instead. Other ports may also implement their own version of prepareForURL.
WebKit Review Bot
Comment 2
2010-03-02 11:31:00 PST
Attachment 49821
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/network/soup/ResourceHandleSoup.cpp:152: Use 0 instead of NULL. [readability/null] [4] WebCore/platform/network/ResourceHandle.cpp:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 3
2010-03-02 11:42:17 PST
Attachment 49821
[details]
did not build on chromium: Build output:
http://webkit-commit-queue.appspot.com/results/321956
Dimitri Glazkov (Google)
Comment 4
2010-03-02 12:13:36 PST
Comment on
attachment 49821
[details]
ResourceHandle::prepareForURL r- since the EWS complains about breakage.
José Millán Soto
Comment 5
2010-03-10 10:03:15 PST
Created
attachment 50412
[details]
ResourceHandle::prepareForURL New version of the patch. It adds an implementation of ResourceHandle::prepareForURL in platform/network/chromium/DNSChromium.cpp, as Chromium does not use ResourceHandler.cpp
WebKit Review Bot
Comment 6
2010-03-10 10:07:50 PST
Attachment 50412
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/network/soup/ResourceHandleSoup.cpp:153: Use 0 instead of NULL. [readability/null] [4] WebCore/platform/network/ResourceHandle.cpp:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 7
2010-03-12 08:54:33 PST
Comment on
attachment 50412
[details]
ResourceHandle::prepareForURL Please fix the style nits. + KURL url(ParsedURLString, "http://"+hostname); Are you sure you want to do this? prefetchDNS is pretty performance sensitive.
José Millán Soto
Comment 8
2010-03-15 07:59:08 PDT
Created
attachment 50704
[details]
ResourceHandle::prepareForURL New version of the patch
> Please fix the style nits.
The problem caused by using NULL in a comment was fixed, but the problem caused by the alphabetical order in the include statements is there because both ResourceHandle.h and ResourceHandleInternal.h are included as primary headers.
WebKit Review Bot
Comment 9
2010-03-15 08:04:32 PDT
Attachment 50704
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/network/ResourceHandle.cpp:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 10
2010-03-15 09:14:16 PDT
> If any of these errors are false positives, please file a bug against > check-webkit-style.
Ok. Sounds we like should file a bug against check-webkit-style then. What about the performance question?
Adam Barth
Comment 11
2010-03-15 09:18:22 PDT
Comment on
attachment 50704
[details]
ResourceHandle::prepareForURL Looks like you solved that problem too. I don't know what soup_session_prepare_for_uri does, but you might want to make sure you're not generating a billion network requests.
José Millán Soto
Comment 12
2010-03-15 09:22:07 PDT
(In reply to
comment #10
)
> > If any of these errors are false positives, please file a bug against > > check-webkit-style. > > Ok. Sounds we like should file a bug against check-webkit-style then.
The coding style guidelines do not consider that a file can have something like #include "ResourceHandleInternal.h", so I'm not sure that opening a bug against check-webkit-style is the best possible solution.
> What about the performance question?
This version does not change the previous soup implementation of prefetchDNS. However, the objective of this patch is to make ResourceHandle::prepareForURL the suggested way of prefetching DNS resolution.
Adam Barth
Comment 13
2010-03-15 09:25:59 PDT
> The coding style guidelines do not consider that a file can have something like > #include "ResourceHandleInternal.h", so I'm not sure that opening a bug against > check-webkit-style is the best possible solution.
The goal for check-webkit-style is to have zero errors in our codebase. That means for every error, we need to either change the codebase or change check-webkit-style. In this case, it looks like check-webkit-style isn't smart enough to understand that ResourceHandle.h and ResourceHandleInternal.h are both primary headers.
José Millán Soto
Comment 14
2010-03-15 09:28:26 PDT
(In reply to
comment #11
)
> (From update of
attachment 50704
[details]
) > Looks like you solved that problem too. I don't know what > soup_session_prepare_for_uri does, but you might want to make sure you're not > generating a billion network requests.
soup_session_prepare_for_uri now only does prefetch DNS, but future implementations may handle other network aspects, like proxy resolution (
https://bugzilla.gnome.org/show_bug.cgi?id=605065
) libsoup handles the network requests to avoid prefetching a domain which was previously resolved.
Adam Barth
Comment 15
2010-03-15 09:29:46 PDT
Great! :)
José Millán Soto
Comment 16
2010-03-15 12:48:04 PDT
Created
attachment 50723
[details]
ResourceHandle::prepareForURL New version of the patch, this one removes Soup implementation of prefetchDNS, as it's now handled by ResourceHandle::prepareForURL,
WebKit Review Bot
Comment 17
2010-03-15 12:51:57 PDT
Attachment 50723
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WARNING: Could not read file. Skipping: "WebCore/platform/network/soup/DNSSoup.cpp" WebCore/platform/network/ResourceHandle.cpp:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 18
2010-03-15 12:57:30 PDT
Comment on
attachment 50723
[details]
ResourceHandle::prepareForURL Ok. + #ifdef HAVE_LIBSOUP_2_29_90 Shouldn't this not be indented?
Eric Seidel (no email)
Comment 19
2010-03-15 15:53:48 PDT
Comment on
attachment 50704
[details]
ResourceHandle::prepareForURL Cleared Adam Barth's review+ from obsolete
attachment 50704
[details]
so that this bug does not appear in
http://webkit.org/pending-commit
.
José Millán Soto
Comment 20
2010-03-16 09:26:09 PDT
Created
attachment 50801
[details]
ResourceHandle::prepareForURL New version of the patch. This time preprocessor directives are not indented.
WebKit Review Bot
Comment 21
2010-03-16 09:31:07 PDT
Attachment 50801
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WARNING: Could not read file. Skipping: "WebCore/platform/network/soup/DNSSoup.cpp" WebCore/platform/network/ResourceHandle.cpp:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 22
2010-03-16 09:59:37 PDT
Comment on
attachment 50801
[details]
ResourceHandle::prepareForURL + #if !USE(SOUP) Is still indented...
José Millán Soto
Comment 23
2010-03-16 10:37:10 PDT
Created
attachment 50807
[details]
ResourceHandle::prepareForURL Let's hope this time is OK.
WebKit Review Bot
Comment 24
2010-03-16 10:41:41 PDT
Attachment 50807
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WARNING: Could not read file. Skipping: "WebCore/platform/network/soup/DNSSoup.cpp" WebCore/platform/network/ResourceHandle.cpp:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 25
2010-03-16 11:08:21 PDT
Comment on
attachment 50807
[details]
ResourceHandle::prepareForURL Yay! Thanks for fixing the nits.
WebKit Commit Bot
Comment 26
2010-03-17 14:47:55 PDT
Comment on
attachment 50807
[details]
ResourceHandle::prepareForURL Clearing flags on attachment: 50807 Committed
r56128
: <
http://trac.webkit.org/changeset/56128
>
WebKit Commit Bot
Comment 27
2010-03-17 14:48:01 PDT
All reviewed patches have been landed. Closing bug.
Xan Lopez
Comment 28
2010-03-25 05:31:40 PDT
***
Bug 32792
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug