Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dash): Improve DASH SegmentTemplate performance with on-demand s…
…egment references (#5061) This is a performance optimization intended to reduce the Video Start Time for DASH streams, both VOD and Live, by reducing the amount of processing done during manifest parse time. This is especially effective for long multi-period assets, assets with many variants, or on low end devices in general. I've provided some measurements showing the performance improvements at the conclusion of this PR. Currently, during manifest parse time for a Segment Template, Shaka will loop through the entire timeline and create segment references for each timeline entry. For a long asset, or an asset with many tracks, this is a significant amount of processing. I've created a new entity called the Timeline Segment Index that extends the SegmentIndex interface. The purpose of the Timeline Segment Index is to ingest a timeline during construction, and then use that information to build Segment References only on demand. This removes the need to parse the entire timeline and create all of the Segment References during parse time. The effects of this change aren't quite as apparent on desktop web browsers, given their speed and power. This improvement really shines on lower end TVs on assets with a long timeline. DASH parsing speed-ups in some cases can be as much as 40%. Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
- Loading branch information