3 ms·
But your entire app wouldn't be held up! Only that subgraph.
by domenicd 10y ago
But your entire app wouldn't be held up! Only that subgraph.
- rich_harris 10y agoSo in the future, you'll have to split up your app into multiple entry points specifically to contain the effects of top-level await spilling out? Sounds like using explicitly async functions would be a far more understandable and maintainable approach.
- robpalmer 10y agoSo the argument is that the bad-effects of top-level await are viral. One bad apple in the app entry point's dependency graph stalls evaluation of the main entry point. And to mitigate this risk, you have to segregate out sub-graphs that you safely load via imperative import(). Doesn't the same risk apply if one of the modules in the graph declaratively imports a module hosted on a slow external CDN?
- untog 10y agoIt does, yes. Using a slow, external CDN is a bad idea for exactly that reason.