You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initialize user code path in typescript first calls getStream to see if a stream exists, then calls create stream. It does so because it
handles partially created users (if the user lost connectivity half way through)
handles any upgrades to the protocol (if we add a new user stream in the future)
However calling getStream on a stream that does not exist is an expensive operation (around 2 seconds)
We would like to do this instead: When we know we are dealing with a new user, always call create stream first. In the case where the stream already exists, catch that error and call get stream instead. This will require some exploration to make sure that the error returned in the partially created user case is properly handled.
The text was updated successfully, but these errors were encountered:
Description
The initialize user code path in typescript first calls getStream to see if a stream exists, then calls create stream. It does so because it
However calling getStream on a stream that does not exist is an expensive operation (around 2 seconds)
We would like to do this instead: When we know we are dealing with a new user, always call create stream first. In the case where the stream already exists, catch that error and call get stream instead. This will require some exploration to make sure that the error returned in the partially created user case is properly handled.
The text was updated successfully, but these errors were encountered: