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

Move api (network connection) to background to improve UX #101

Open
fyang1024 opened this issue Jul 14, 2019 · 2 comments
Open

Move api (network connection) to background to improve UX #101

fyang1024 opened this issue Jul 14, 2019 · 2 comments

Comments

@fyang1024
Copy link
Contributor

Currently api (network connection) is opened when user opens extension and closed when user closes the extension. The benefit is there is no unnecessary network connection. The side effect is user may experience waiting time for first balance display (It takes about 3 seconds to establish an api connection).

If we move the api connection to background, that means once user opens browser, the connect will get opened until the browser is closed. Given nowadays most people keep browser opens, api connection is probably ready whenever user opens the extension, which means user does not have to wait the 3 seconds whenever she/he opens the extension.

Another benefit is if user start a transaction in extension, the connection won't be lost if impatient user closes the extension straightaway, which will cause unnoticed tx failure.

@hskang9
Copy link
Contributor

hskang9 commented Jul 18, 2019

Another benefit would be that user can check the query instantly after the extension is open. It takes time to connect the api, and we cannot rely on loader every time.

@fyang1024
Copy link
Contributor Author

Just thought of a downside of this approach - if we keep connection at background, there will be probably many many open connections to rpc endpoints if many people use Speckle. Those open connections will be a big burden on the rpc endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants