Bug 186060 - Store 0-lifetime stylesheets / scripts into the disk cache for faster history navigations
Summary: Store 0-lifetime stylesheets / scripts into the disk cache for faster history...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-29 13:52 PDT by Chris Dumez
Modified: 2018-06-06 12:58 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.34 KB, patch)
2018-05-29 13:58 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.35 KB, patch)
2018-05-29 14:39 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-05-29 13:52:47 PDT
Store 0-lifetime stylesheets / scripts into the disk cache for faster history navigations. In particular, on apple.com, several of the scripts / stylesheets currently do not get stored because our current heuristic thinks they are unlikely to be reused.

For e.g.:
Summary
URL: https://www.apple.com/ac/globalfooter/3/en_US/styles/ac-globalfooter.built.css
Status: 200 OK

Request
No request, served from the disk cache.

Response
Date: Tue, 29 May 2018 20:41:41 GMT
Connection: keep-alive
Content-Encoding: gzip
Access-Control-Allow-Origin: https://www.apple.com
Expires: Tue, 29 May 2018 20:41:41 GMT
Cache-Control: max-age=0
Content-Length: 5212
Vary: Accept-Encoding
Content-Type: text/css
Server: Apache
X-Check-Cacheable: YES
X-Serial: 6858
Comment 1 Radar WebKit Bug Importer 2018-05-29 13:53:23 PDT
<rdar://problem/40627270>
Comment 2 Chris Dumez 2018-05-29 13:58:22 PDT
Created attachment 341515 [details]
Patch
Comment 3 Geoffrey Garen 2018-05-29 14:34:46 PDT
Comment on attachment 341515 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=341515&action=review

r=me

> Source/WebKit/ChangeLog:9
> +        Tweak our storeUnconditionallyForHistoryNavigation logic to match resources' whose priority

resources
Comment 4 Chris Dumez 2018-05-29 14:39:33 PDT
Created attachment 341519 [details]
Patch
Comment 5 WebKit Commit Bot 2018-05-29 15:14:09 PDT
Comment on attachment 341519 [details]
Patch

Clearing flags on attachment: 341519

Committed r232275: <https://trac.webkit.org/changeset/232275>
Comment 6 WebKit Commit Bot 2018-05-29 15:14:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Chris Dumez 2018-06-02 16:34:49 PDT
Reverted r232275 for reason:

May have caused a ~1% PLT regression on iOS

Committed r232447: <https://trac.webkit.org/changeset/232447>
Comment 8 Chris Dumez 2018-06-06 12:42:24 PDT
Apparently too costly. I don't have a better idea at the moment.
Comment 9 Antti Koivisto 2018-06-06 12:58:37 PDT
This seems like something the site should fix rather than something we should optimise for.