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

Optimize block/unblock #90

Closed

Conversation

vincentfretin
Copy link
Contributor

See #80
Now that get_publisher is optimized and cost is O(1) , prefer using it instead of iterating over publishers in the room to send the blocked/unblocked event to the blocked user.
Well this may not be a big optimization, this is more for code readability and also to avoid having something like

        for room in &joined.room_ids {
            notify_user(&event, &whom, switchboard.publishers_occupying(&room));
        }

if a publisher is in several rooms, see #55 (comment) for context.

I tested it with the naf-adapter-janus example, the messages are still sent:
Capture d’écran de 2021-07-10 11-37-52

… publishers in the room to send the blocked/unblocked event (closes mozilla#80)
@vincentfretin
Copy link
Contributor Author

I merged this in master in networked-aframe fork https://github.com/networked-aframe/janus-plugin-sfu

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.

None yet

1 participant