Re: [w3c/ServiceWorker] Top-level await integration for ServiceWorkers running modules (#1407)

@Jamesernator 

> I think there's a false association that async implies slow.

Nah, the assumption is that in-series is slower than in-parallel.

```js
const asyncResult = await doAsyncThing();

addEventListener('fetch', (event) => {
  if (asyncResultNeeded) {
    // …
  }
});
```

Vs:

```js
const asyncResultP = doAsyncThing();

addEventListener('fetch', async (event) => {
  if (asyncResultNeeded) {
    const asyncResult = await asyncResultP;
    // …
  }
});
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1407#issuecomment-502603065

Received on Monday, 17 June 2019 09:16:52 UTC