perf(frontend): reduce time required to switch conversations/calls
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 586
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 333
Description
Reference / previous discussion: #15336
Quick fix: #17782
Drawback: router listener takes longer, as leaveConversation > joinConversation are now conseqent requests to server/HPB
To verify:
If I am not mistaken (but I am speaking from memory, so take this with a pinch of salt) joining a new conversation implicitly leaves the old one, so a possible improvement might be to wait only if the user is active in a call, and otherwise just switch to the new conversation without waiting. This should solve the race condition when switching between calls and at the same time prevent the delays introduced with this fix when switching between conversations.
Originally posted by @danxuliu in https://github.com/nextcloud/spreed/pull/17782#pullrequestreview-4161994269
- API: whether DELETE to
room/{old-token}/participants/activeis required, if followed by POST toroom/{new-token}/participants/activewithin the same PHP session?
cc @nickvergessen - HPB: whether SIgnaling.leaveRoom is required, if followed by Signaling.joinRoom
cc @fancycode
https://github.com/nextcloud/spreed/blob/c5bebdafbf44a24bd42503879f786b6bbf8a255a/src/utils/signaling.js#L250-L266
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the previous discussion in #15336, the quick fix in #17782, and the signaling logic in src/utils/signaling.js around lines 250-266. Investigate whether the active-participant DELETE and Signaling.leaveRoom are required before switching, then establish a verified conversation and call-switching behavior without the introduced delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, audio-video-rtc, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100