GoogleCloudPlatform / gcping

The source for the CLI and web app at gcping.com

Home Page:https://gcping.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move to service workers for request to parallelize

crwilcox opened this issue · comments

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

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

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 :)