Skip to content

Performance improvements#52

Merged
Baraujo25 merged 6 commits into
masterfrom
PERFORMANCE_IMPROVEMENTS
Jul 8, 2026
Merged

Performance improvements#52
Baraujo25 merged 6 commits into
masterfrom
PERFORMANCE_IMPROVEMENTS

Conversation

@Baraujo25

Copy link
Copy Markdown
Collaborator

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 in VideoStreamingSampler, 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.java to only normalize line endings when necessary, avoiding unnecessary string replacements.

  • In Manifest.java, introduced a shared, thread-safe MPDParser instance for DASH manifest parsing, and updated usage to improve efficiency and thread safety.

Test coverage and thread safety:

  • Added comprehensive tests for concurrent parsing of DASH manifests to ensure thread safety of the shared parser instance, as well as tests for both static and dynamic manifest parsing.

Miscellaneous:

  • Added necessary imports and setup in test files to support new features and maintain test reliability.

These changes collectively improve the efficiency, scalability, and reliability of the video streaming samplers in both production and test environments.

@Baraujo25 Baraujo25 merged commit 82c897b into master Jul 8, 2026
1 check passed
@Baraujo25 Baraujo25 deleted the PERFORMANCE_IMPROVEMENTS branch July 8, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant