Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api-base): resolve resource promises in parallel
Summary: When fetching built-in resources (e.g. techlibs) for the virtual filesystem, do it in parallel by building up an array of promises and resolving them via `Promise.all`, rather than doing so sequentially. A nice effect of this is that it helps avoid HOL blocking when the resource might be non-local e.g. your in-browser HTTP request to a CDN or server suddenly starts having bad latency. It also lets us get away with less logging (ref: #2), and removing these explicit `console.log` calls actually fixes an awkward case where `printLine` is set to a no-op function to keep things quiet, but these logs would still get output with no way to suppress it. (If this is ever brought back it should at least respect the `printLine` callback.) Fixes #2. Signed-off-by: Austin Seipp <aseipp@pobox.com> Change-Id: Ie8085a216c22576d6956f007e2859e2381a56a12
- Loading branch information