Repository navigation
perf(core): Safari keeps a later clip's src off until it is near - #7446
Closed
miguel-heygen wants to merge 4 commits into
Closed
miguel-heygen wants to merge 4 commits into
miguel-heygen wants to merge 4 commits into
Conversation
… from its element
Contributor
2 of 4 tasks
Collaborator
Author
|
Closing: deferred src gave no gain on a real iPhone (interleaved with main: 14.7/35.0/28.5 s and 32.6/8.0/30.8 s against main 28.7 s, with main itself sometimes in a 5 s mode). The fragment with fetch-ahead (#7436) is what earned the gain. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Experiment, parked as a draft: on Safari in the player, a later clip has no src until it is near, so it does not load at page load.
Why
Measured on a phone, every media element loads at page load and reads about 35 MB from the head of the file; a film of many cuts from one 68 MB file moves 575 MB. This tries keeping about two clips live. It is built so the phone can judge it; it is not asked for review.
Related work
Refs the Safari parity work; the in-point fragment attempt is #7436. Neither has beaten main on a phone.
How
holdBackUntilNearremoves the src of a later timed clip as it parses (and of those already parsed),restoreHeldBackSrcputs it back when the clip is preloaded, visible, or scheduled for audio. Every reader of the src goes throughunproxiedSrc, which answers the authored src while it is held back. Player frame only, WebKit only.Test plan
preloadMedia.test.ts(held back, restored on preload, restored for the audio route without loading, already parsed, first take and clips without authored length untouched, Studio and other browsers untouched).