No need to lazily initialize ResourceResponse internals when accessing timing data.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Jun 2014 21:51:00 +0000 (21:51 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Jun 2014 21:51:00 +0000 (21:51 +0000)
commit82ef5e69f83c1f870e92e046555a9f2ba0727faf
treed7eba47275840af4c7c9102d714fab1c7ce7c664
parent5a06876a5b4adc613af00e49340a9b1e6bebab97
No need to lazily initialize ResourceResponse internals when accessing timing data.
<https://webkit.org/b/134437>
<rdar://problem/17499876>

When building with ENABLE(WEB_TIMING), the last thing that would happen when
serializing a ResourceResponse in the network process is that we'd retrieve
the ResourceLoadTiming to encode it as part of the response. Doing so would
trigger the lazy instantiation of ResourceResponse's internal data structures.

Since timing data is not actually lazily instantiated, we can just not do that.

This shaves off ~550ms of network process main thread time on PLT, reducing
response latency by not doing unnecessary stuff before letting the web process
look at the downloaded data.

Reviewed by Gavin Barraclough.

* WebCore.exp.in:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
(WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::resourceLoadTiming):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.h