Bug 235535 - Network Cache: do not use disk cache for Fetch media loads
Summary: Network Cache: do not use disk cache for Fetch media loads
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-24 12:39 PST by Olivier Blin
Modified: 2024-02-12 02:03 PST (History)
14 users (show)

See Also:


Attachments
Patch (2.50 KB, patch)
2022-01-24 12:43 PST, Olivier Blin
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Blin 2022-01-24 12:39:39 PST
In r183467, checks have been added to avoid putting media resources from XHR requests in the disk cache, since they are likely specific to MSE streaming.
But this does not check for Fetch requests, which can also be used for MSE streaming.

This has been found by using Shaka Player on a low-end device.
Playing high quality MSE content was pushing to the disk cache faster than the device could handle.
Media data was accumulating in the the background IOQueue thread, and the NetworkProcess memory was constantly increasing.

Recently, similar checks have been added for the MSE IPC overhead in r282003.
Loïc found a few differences:
- it supports ResourceLoadInfo::Type::XMLHTTPRequest and ResourceLoadInfo::Type::Fetch, but not ResourceLoadInfo::Type::Media
- it has a different definition of isMediaMIMEType, which adds application/octet-stream to the audio/* and video/* we have in makeStoreDecision()

Should we attempt to factorize these checks?
Comment 1 Olivier Blin 2022-01-24 12:43:28 PST
Created attachment 449846 [details]
Patch
Comment 2 Darin Adler 2022-01-24 23:00:28 PST
Comment on attachment 449846 [details]
Patch

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

Looks good

> Source/WebKit/ChangeLog:23
> +        No new tests (OOPS!).

Can’t land a patch that still has this in it. Need to remove this line, and replace it with an explanation of why we are landing this patch without any tests. Might want to look back at the original XHR change to see how they wrote the test.
Comment 3 Darin Adler 2022-01-24 23:00:46 PST
(In reply to Olivier Blin from comment #0)
> Should we attempt to factorize these checks?

Yes.
Comment 4 Radar WebKit Bug Importer 2022-01-31 12:40:18 PST
<rdar://problem/88288422>
Comment 5 Olivier Blin 2024-02-12 02:03:22 PST
Pull request: https://github.com/WebKit/WebKit/pull/24243