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 to service workers for request to parallelize #78

Open
crwilcox opened this issue Nov 17, 2021 · 2 comments
Open

Move to service workers for request to parallelize #78

crwilcox opened this issue Nov 17, 2021 · 2 comments

Comments

@crwilcox
Copy link
Contributor

crwilcox commented Nov 17, 2021

I think we could get the exec time down for gcping, also make it seem a bit more responsive if we used service workers for the requests?

https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers

@yuryu
Copy link
Member

yuryu commented Nov 21, 2022

I don't think we need to use web workers. Currently the code awaits each region, so I think simply sending requests to all regions and await for Promise.all() later would parallelize the request.

https://github.com/GoogleCloudPlatform/gcping/blob/main/web/src/js/gcping.js#L93

@crwilcox
Copy link
Contributor Author

I think that is correct. The code linked to is the code that needs changing, and this issue may have been overly prescriptive in how to address :)

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

No branches or pull requests

2 participants