Skip to content

perf(frontend): reduce time required to switch conversations/calls #17786

@Antreesy

Description

@Antreesy

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 #17782 (review)

  • API: whether DELETE to room/{old-token}/participants/active is required, if followed by POST to room/{new-token}/participants/active within the same PHP session?
    cc @nickvergessen
  • HPB: whether SIgnaling.leaveRoom is required, if followed by Signaling.joinRoom
    cc @fancycode
    Signaling.Base.prototype.leaveRoom = function(token) {
    this.leaveCurrentCall()
    .then(() => {
    this._trigger('leaveRoom', [token])
    this._doLeaveRoom(token)
    return new Promise((resolve, reject) => {
    this._leaveRoomSuccess(token)
    resolve()
    // We left the current room.
    if (token === this.currentRoomToken) {
    this.currentRoomToken = null
    this.nextcloudSessionId = null
    }
    })
    })
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions