gcping
gcping copied to clipboard
Move to service workers for request to parallelize
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 await
s 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 :)