Bug 117775
Summary: | Don't retain for the main resource by default | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, barraclough, bfulgham, ggaren, kling, koivisto, rreno, vitor.roriz |
Priority: | P2 | Keywords: | BlinkMergeCandidate |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
Consider merging https://chromium.googlesource.com/chromium/blink/+/dad552a64c76e19cffe7c8bea07ffb86c21529be
Prior to this CL, we always retained the underlying data for the main resource.
Unfortunately, the main resource can be quite large. For example, on Mobile
Gmail, retaining the main resource costs 1.5 MB.
After this CL, we clear the main resource after the load completes. In
subsequent CLs, I hope to remove the need to retain the main resource during
the loading process.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Geoffrey Garen
This may violate the WebKit1 API. But perhaps it's compatible with the WebKit2 API.
That said, the main resource is almost certainly in cache, so it's not clear to me what benefit there is to not retaining it.
Ahmad Saleem
In DocumentLoader.cpp:
This seems to be added:
https://github.com/WebKit/WebKit/blob/7de67f9a0ccc4fc8ce195e32f61e7873ad81345e/Source/WebCore/loader/DocumentLoader.cpp#L208
but not here in DocumentLoader::mainResourceData:
https://github.com/WebKit/WebKit/blob/7de67f9a0ccc4fc8ce195e32f61e7873ad81345e/Source/WebCore/loader/DocumentLoader.cpp#L223
Not after this as well:
https://github.com/WebKit/WebKit/blob/7de67f9a0ccc4fc8ce195e32f61e7873ad81345e/Source/WebCore/loader/DocumentLoader.cpp#L515
Does not add 'void DocumentLoader::clearMainResourceHandle()' from Chromium / Blink patch.
_____________
This is added in DocumentLoader.h:
https://github.com/WebKit/WebKit/blob/7de67f9a0ccc4fc8ce195e32f61e7873ad81345e/Source/WebCore/loader/DocumentLoader.h#L497