Skip to content

stream.hls: refactor M3U8Parser state attributes #5521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bastimeyer
Copy link
Member

Store the parser state in dedicated attributes with proper typing information instead of using a state hash map with arbitrary keys.


This was never changed since the initial implementation in 39008e9, probably because of the convenience of being able to read and unset certain data in a single call via pop(). That however doesn't justify the CPU and memory disadvantanges that come with this design choice, so let's finally fix it.

Store the parser state in dedicated attributes with proper typing
information instead of using a state hash map with arbitrary keys.
Copy link
Member

@gravyboat gravyboat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@bastimeyer bastimeyer merged commit 2702c89 into streamlink:master Aug 31, 2023
@bastimeyer bastimeyer deleted the stream/hls/refactor-parser-state branch August 31, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants