mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-15 16:06:41 +03:00
3a5d588dbd
Two targeted performance improvements in aimed at reducing overhead on older devices 1. Avoid intermediate array for representation ID uniqueness check Previously, all representation IDs were pushed into a temporary ids[] array, then a Set - this PR eliminates the array allocation entirely. 2. Re-parse only affected AdaptationSets for dependency streams Previously, when any stream had a dependency stream, every AdaptationSet was re-parsed from XML. Now, only the specific AdaptationSet nodes that contain streams with dependencies are re-parsed. This avoids redundant XML traversal and parsing for the common case where most adaptation sets have no dependency streams.