RESOLVED FIXED170676
Cache small media resources in disk cache
https://bugs.webkit.org/show_bug.cgi?id=170676
Summary Cache small media resources in disk cache
Antti Koivisto
Reported 2017-04-10 08:19:04 PDT
We don't currently cache media resources persistently to avoid filling the cache. We should allow caching of reasonably sized media resources.
Attachments
patch (18.57 KB, patch)
2017-04-10 08:42 PDT, Antti Koivisto
buildbot: commit-queue-
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (870.03 KB, application/zip)
2017-04-10 09:59 PDT, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (904.47 KB, application/zip)
2017-04-10 10:23 PDT, Build Bot
no flags
patch (19.84 KB, patch)
2017-04-10 10:32 PDT, Antti Koivisto
no flags
patch (19.86 KB, patch)
2017-04-10 11:36 PDT, Antti Koivisto
buildbot: commit-queue-
Archive of layout-test-results from ews126 for ios-simulator-wk2 (13.53 MB, application/zip)
2017-04-10 13:25 PDT, Build Bot
no flags
patch (20.05 KB, patch)
2017-04-11 02:49 PDT, Antti Koivisto
buildbot: commit-queue-
Archive of layout-test-results from ews122 for ios-simulator-wk2 (814.46 KB, application/zip)
2017-04-11 07:13 PDT, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (12.94 MB, application/zip)
2017-04-11 08:31 PDT, Build Bot
no flags
patch (20.59 KB, patch)
2017-04-12 01:15 PDT, Antti Koivisto
kling: review+
Radar WebKit Bug Importer
Comment 1 2017-04-10 08:19:41 PDT
Antti Koivisto
Comment 2 2017-04-10 08:42:30 PDT
Build Bot
Comment 3 2017-04-10 09:59:48 PDT
Comment on attachment 306689 [details] patch Attachment 306689 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3511890 New failing tests: http/tests/cache/disk-cache/disk-cache-media-small.html
Build Bot
Comment 4 2017-04-10 09:59:49 PDT
Created attachment 306696 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 5 2017-04-10 10:23:16 PDT
Comment on attachment 306689 [details] patch Attachment 306689 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3511931 New failing tests: http/tests/cache/disk-cache/disk-cache-media-small.html
Build Bot
Comment 6 2017-04-10 10:23:17 PDT
Created attachment 306702 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Antti Koivisto
Comment 7 2017-04-10 10:32:10 PDT
Antti Koivisto
Comment 8 2017-04-10 11:36:15 PDT
Build Bot
Comment 9 2017-04-10 13:25:35 PDT
Comment on attachment 306724 [details] patch Attachment 306724 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3512841 New failing tests: http/tests/cache/disk-cache/disk-cache-media-small.html
Build Bot
Comment 10 2017-04-10 13:25:36 PDT
Created attachment 306735 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Antti Koivisto
Comment 11 2017-04-11 02:49:56 PDT
Build Bot
Comment 12 2017-04-11 07:13:45 PDT
Comment on attachment 306792 [details] patch Attachment 306792 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3516981 New failing tests: http/tests/cache/disk-cache/disk-cache-media-small.html
Build Bot
Comment 13 2017-04-11 07:13:46 PDT
Created attachment 306814 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 14 2017-04-11 08:31:54 PDT
Comment on attachment 306792 [details] patch Attachment 306792 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3517397 New failing tests: http/tests/cache/disk-cache/disk-cache-media-small.html
Build Bot
Comment 15 2017-04-11 08:31:56 PDT
Created attachment 306819 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Antti Koivisto
Comment 16 2017-04-12 01:15:01 PDT
Andreas Kling
Comment 17 2017-04-12 01:36:46 PDT
Comment on attachment 306893 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=306893&action=review r=me > Source/WebCore/loader/MediaResourceLoader.h:58 > + Vector<ResourceResponse> responsesForTesting() const { return m_responsesForTesting; } This could return a const Vector<ResourceResponse>& I suppose, though if it's just for testing it matters less. > Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:238 > + if (StringView(contentRange).left(6) != ASCIILiteral("bytes ")) > + return { }; I would write this using contentRange.startsWith().
Antti Koivisto
Comment 18 2017-04-12 03:18:19 PDT
Antti Koivisto
Comment 19 2017-04-13 01:33:25 PDT
Made the test less flaky in https://trac.webkit.org/r215317
Note You need to log in before you can comment on or make changes to this bug.