Skip to content
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

Timestamp init wait occurs after dataSource.open() #9777

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

stevemayhew
Copy link
Contributor

Opening the DataSource is one of the longer operations in the Loader sequence, as it requires a round trip to the origin server. This change allows all the potential Loader threads to perform this operation before one of them is forced to wait on shared TimestampAdjuster initialization.

Also, the initialization segment load will never produce media samples, so there is no need for it to wait for TimestampAdjuster initialization.

Opening the `DataSource` is one of the longer operations in the `Loader` sequence, as it requires a round trip to the origin server.   This change allows all the potential `Loader` threads to perform this operation before one of them is forced to wait on shared TimestampAdjuster initialization.

Also, the initialization segment load will never produce media samples, so there is no need for it to wait for `TimestampAdjuster` initialization.
@stevemayhew
Copy link
Contributor Author

Sorry this took a while @ojw28 This is what we talked about in issue #8952

Great idea to add the boolean, this way any init data can load in parallel with the other loader threads as it will of course never produce samples.

Here's the before sequence diagram

And after sequence diagram

@icbaker icbaker requested a review from christosts December 13, 2021 09:22
@tonihei tonihei merged commit 5c8b5e5 into google:dev-v2 Jan 4, 2022
@stevemayhew stevemayhew deleted the p-optimize-timestampadjuster-wait branch January 5, 2022 01:15
icbaker pushed a commit that referenced this pull request Feb 18, 2022
@google google locked and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants