Skip to content

Speed up publish negotiation #614

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
merged 23 commits into from
Apr 4, 2025
Merged

Speed up publish negotiation #614

merged 23 commits into from
Apr 4, 2025

Conversation

hiroshihorie
Copy link
Member

@hiroshihorie hiroshihorie commented Mar 3, 2025

When enabled by server, we don't need to wait for AddTrackRequest to return so we can negotiate concurrently.

Reference:
livekit/client-sdk-android#612
livekit/client-sdk-js#1228
livekit/client-sdk-js#1231

Copy link

ilo-nanpa bot commented Mar 3, 2025

it seems like you haven't added any nanpa changeset files to this PR.

if this pull request includes changes to code, make sure to add a changeset, by writing a file to .nanpa/<unique-name>.kdl:

minor type="added" "Introduce frobnication algorithm"

refer to the manpage for more information.

@hiroshihorie hiroshihorie requested a review from ladvoc March 24, 2025 18:13
@hiroshihorie hiroshihorie changed the title Speed up publish Speed up publish negotiation Mar 24, 2025
@hiroshihorie hiroshihorie marked this pull request as ready for review March 24, 2025 18:16
Copy link
Contributor

@ladvoc ladvoc left a comment

Choose a reason for hiding this comment

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

LGTM ✅

// Concurrent
async let trackInfoPromise = addTrackFunc()
async let negotiatePromise: () = negotiateFunc()
let (trackInfo, _) = try await (trackInfoPromise, negotiatePromise)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a pity we don't pass anything between these methods to enforce the dependency (kind of key-lock pattern), otherwise LGTM 👍

@hiroshihorie hiroshihorie requested a review from pblazej April 4, 2025 05:48
@hiroshihorie
Copy link
Member Author

@pblazej please take a look if bdeb0e9 looks good. 🙏

@pblazej
Copy link
Contributor

pblazej commented Apr 4, 2025

BTW @hiroshihorie I found another blocker → here's the fix #659

@hiroshihorie hiroshihorie merged commit c2efb74 into main Apr 4, 2025
20 checks passed
@hiroshihorie hiroshihorie deleted the hiroshi/speed-up-publish branch April 4, 2025 14: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.

3 participants