-
Notifications
You must be signed in to change notification settings - Fork 1.4k
perf(CEA): Remove captions attached to removed segments #9068
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
+67
−43
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
avelad
approved these changes
Sep 9, 2025
Collaborator
|
Incremental code coverage: 83.33% |
avelad
pushed a commit
that referenced
this pull request
Sep 9, 2025
TextEngine was storing closed captions and releasing them only on teardown. This might be a potential memory leak for long running sessions. This PR addresses it by removing cached captions along with removed segments. Furthermore, it adds some more tweaks and improvements, such as: - simplify CEA cache structure, from `Map<string, Map<string, Array<Cue>>>` to `Map<string, Array<Cue>>` - adjust TextEngine buffered ranges with cached cues values
avelad
pushed a commit
that referenced
this pull request
Sep 9, 2025
TextEngine was storing closed captions and releasing them only on teardown. This might be a potential memory leak for long running sessions. This PR addresses it by removing cached captions along with removed segments. Furthermore, it adds some more tweaks and improvements, such as: - simplify CEA cache structure, from `Map<string, Map<string, Array<Cue>>>` to `Map<string, Array<Cue>>` - adjust TextEngine buffered ranges with cached cues values
avelad
pushed a commit
that referenced
this pull request
Sep 22, 2025
This change will prevent removing every stored caption on seeking. Issue is a regression introduced in #9068
avelad
pushed a commit
that referenced
this pull request
Sep 29, 2025
This change will prevent removing every stored caption on seeking. Issue is a regression introduced in #9068
avelad
pushed a commit
that referenced
this pull request
Sep 29, 2025
This change will prevent removing every stored caption on seeking. Issue is a regression introduced in #9068
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
component: captions/subtitles
The issue involves captions or subtitles
priority: P1
Big impact or workaround impractical; resolve before feature release
status: archived
Archived and locked; will not be updated
type: performance
A performance issue
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.
TextEngine was storing closed captions and releasing them only on teardown. This might be a potential memory leak for long running sessions.
This PR addresses it by removing cached captions along with removed segments. Furthermore, it adds some more tweaks and improvements, such as:
Map<string, Map<string, Array<Cue>>>toMap<string, Array<Cue>>