Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: PeriodCombiner improvements (#6005)
Summary of changes: - create dummy streams during preparing arrays of input streams - use hash map to quickly find perfect stream matches across periods - hash map also automatically removes duplicates, so remove previous logic for finding them - check earlier are we trying to create output stream from dummy stream - 2 changes from above also gives us a possibility to simplify `areCompatible()` & `isBetterMatch()` methods - reduce creation of spare collections when concatenating streams - reduce conditional logic when possible I was testing `PeriodCombiner.combinePeriods()` performance of mentioned changes on Tizen 2021 on 2 streams and I've got following results: | content | upstream | proposed changes | | - | -: | -: | | stream 1 | 23 ms | 17 ms | | stream 2 | 484 ms | 191 ms | Both streams are VOD. Stream 1 has 18 periods with 6 video & audio tracks in each. Stream 2 has 18 periods with 6 video tracks & 36 audio tracks in each.
- Loading branch information