Performance improvements#52
Merged
Merged
Conversation
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.
This pull request introduces significant improvements to memory management and thread safety in the video streaming samplers, as well as enhancements to test coverage. The main updates include the ability to optionally release HTTP response data after processing to reduce memory usage, improved handling of playlist parsing, and new tests to ensure thread safety and correct behavior of these features.
Memory management and response data handling:
Added new properties (
hls.sampler.releaseSegmentResponseData,hls.sampler.releasePlaylistResponseData) to control whether segment and playlist HTTP response data are released after processing, reducing memory usage. Corresponding logic and helper methods were implemented inVideoStreamingSampler, and calls to release response data were added at appropriate points in both HLS and DASH samplers.Updated tests to verify that response data is correctly released when the new properties are enabled, and ensured test isolation by resetting property caches and environment setup.
Playlist and manifest parsing improvements:
Improved playlist parsing in
Playlist.javato only normalize line endings when necessary, avoiding unnecessary string replacements.In
Manifest.java, introduced a shared, thread-safeMPDParserinstance for DASH manifest parsing, and updated usage to improve efficiency and thread safety.Test coverage and thread safety:
Miscellaneous:
These changes collectively improve the efficiency, scalability, and reliability of the video streaming samplers in both production and test environments.