[webkit-reviews] review requested: [Bug 53192] Add experimental support for HTTP pipelining in CFNetwork : [Attachment 80237] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 26 14:22:03 PST 2011


David Kilzer (ddkilzer) <ddkilzer at webkit.org> has asked  for review:
Bug 53192: Add experimental support for HTTP pipelining in CFNetwork
https://bugs.webkit.org/show_bug.cgi?id=53192

Attachment 80237: Patch
https://bugs.webkit.org/attachment.cgi?id=80237&action=review

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
Reviewed by NOBODY (OOPS!).

Source/WebCore:

This adds support for HTTP pipelining in CFNetwork, but does not
enable it.  To enable it post-SnowLeopard, use this command:

defaults write BUNDLE.ID WebKitEnableHTTPPipelining -bool YES

Once enabled, it is possible to force the same load priority
(high) to be sent to CFNetwork to allow WebCore to handle the
scheduling:

defaults write BUNDLE.ID WebKitForceHTTPPipeliningPriorityHigh -bool YES

* WebCore.exp.in: Export _wkGetHttpPipeliningPriority and
_wkSetHttpPipeliningPriority.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
Copy the priority to preflightRequest.

* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad): If HTTP
pipelining is enabled, serve all requests regardless of priority
to keep the pipeline full.  Refactored code at the end of the
method to use an early return.

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::load): Set the priority on the
ResourceRequest object based on the priority of the
CachedResourceRequest before calling
ResourceLoadScheduler::scheduleSubresourceLoad().

* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading): Create a ResourceRequest
object and set its priority to ResourceLoadPriorityLow before
passing it to ResourceLoadScheduler::scheduleSubresourceLoad().

* platform/mac/WebCoreSystemInterface.h:
(wkGetHttpPipeliningPriority): Added.
(wkSetHttpPipeliningPriority): Added.
* platform/mac/WebCoreSystemInterface.mm:
(wkGetHttpPipeliningPriority): Added.
(wkSetHttpPipeliningPriority): Added.

* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt): Set m_priority when
adopting a CrossThreadResourceRequestData.
(WebCore::ResourceRequestBase::copyData): Set m_priority when
creating a CrossThreadResourceRequestData.
(WebCore::ResourceRequestBase::priority): Added.
(WebCore::ResourceRequestBase::setPriority): Added.
(WebCore::equalIgnoringHeaderFields): Priorities must match when
comparing two ResourceRequest objects.

* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::ResourceRequestBase): Set default
priority of new objects to ResourceLoadPriorityLow.
(WebCore::ResourceRequestBase::priority): Added declaration.
(WebCore::ResourceRequestBase::setPriority): Added declaration.
(WebCore::isHttpPipeliningEnabled): Added.
(WebCore::shouldUseHttpPipeliningPriority): Added.

* platform/network/cf/ResourceRequestCFNet.cpp: Updated so that
Mac OS X and Windows share code.
(WebCore::initializeMaximumHTTPConnectionCountPerHost): Always
set the HTTP connection count per host, but return an
'unlimited' value when using HTTP pipelining.  This method used
to be defined in ResourceRequestMac.mm for Mac OS X.
(WebCore::readBooleanPreference): Added.  Helper method for
reading boolean user defaults.
(WebCore::isHttpPipeliningEnabled): Returns value of user
default key WebKitEnableHTTPPipelining, or false if not set.
(WebCore::shouldUseHttpPipeliningPriority): Returns value of
user default key WebKitForceHTTPPipeliningPriorityHigh, or false
if not set.
* platform/network/cf/ResourceRequestCFNet.h: Updated so that
Mac OS X and Windows share code.  Fixed indentation.
(WebCore::mapHttpPipeliningPriorityToResourceLoadPriority): Added.
(WebCore::mapResourceLoadPriorityToHttpPipeliningPriority): Added.

* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Update
HTTP pipelining priority on NSMutableFURLRequest object.
(WebCore::ResourceRequest::doUpdateResourceRequest): Update
m_priority from the NSURLRequest object.
(WebCore::initializeMaximumHTTPConnectionCountPerHost): Removed.
Code is now shared with Windows in ResourceRequestCFNet.cpp.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Added initialization for
GetHttpPipeliningPriority and SetHttpPipeliningPriority.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Added initialization for
GetHttpPipeliningPriority and SetHttpPipeliningPriority.

WebKitLibraries:

* WebKitSystemInterface.h:
New methods added for HTTP pipelining support.
(WKGetHttpPipeliningPriority): Added.
(WKSetHttpPipeliningPriority): Added.
Unrelated methods added after updating the header.
(WKMakeScrollbarPainter): Added.
(WKScrollbarPainterPaint): Added.
* libWebKitSystemInterfaceLeopard.a: Updated.
* libWebKitSystemInterfaceSnowLeopard.a: Updated.
---
 21 files changed, 302 insertions(+), 25 deletions(-)


More information about the webkit-reviews mailing list