Bug 170676 - Cache small media resources in disk cache
Summary: Cache small media resources in disk cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-10 08:19 PDT by Antti Koivisto
Modified: 2017-04-13 01:33 PDT (History)
6 users (show)

See Also:


Attachments
patch (18.57 KB, patch)
2017-04-10 08:42 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
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 Details
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 Details
patch (19.84 KB, patch)
2017-04-10 10:32 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (19.86 KB, patch)
2017-04-10 11:36 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
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 Details
patch (20.05 KB, patch)
2017-04-11 02:49 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
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 Details
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 Details
patch (20.59 KB, patch)
2017-04-12 01:15 PDT, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 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.
Comment 1 Radar WebKit Bug Importer 2017-04-10 08:19:41 PDT
<rdar://problem/31532649>
Comment 2 Antti Koivisto 2017-04-10 08:42:30 PDT
Created attachment 306689 [details]
patch
Comment 3 Build Bot 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
Comment 4 Build Bot 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
Comment 5 Build Bot 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
Comment 6 Build Bot 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
Comment 7 Antti Koivisto 2017-04-10 10:32:10 PDT
Created attachment 306705 [details]
patch
Comment 8 Antti Koivisto 2017-04-10 11:36:15 PDT
Created attachment 306724 [details]
patch
Comment 9 Build Bot 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
Comment 10 Build Bot 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
Comment 11 Antti Koivisto 2017-04-11 02:49:56 PDT
Created attachment 306792 [details]
patch
Comment 12 Build Bot 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
Comment 13 Build Bot 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
Comment 14 Build Bot 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
Comment 15 Build Bot 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
Comment 16 Antti Koivisto 2017-04-12 01:15:01 PDT
Created attachment 306893 [details]
patch
Comment 17 Andreas Kling 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().
Comment 18 Antti Koivisto 2017-04-12 03:18:19 PDT
https://trac.webkit.org/r215263
Comment 19 Antti Koivisto 2017-04-13 01:33:25 PDT
Made the test less flaky in https://trac.webkit.org/r215317