-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove need for
async getNonDefaultBrowser function
There is very little distance between `new ControlServer` (which starts the HTTP server but doesn't wait for it to be ready), and the `server.launchBrowser()` call which awaits this via `this.getProxyBase()`. To make the most of this: * move down, toward the end of `launchBrowser`. * move the lazy `import()` up, to outside and before the browserNames loop and, and thus any `await this.getProxyBase()` in launchBrowser. Previously, it was deferred until the the first non-builtin browser which may be never, or later when the server is already waited for by a previous browser launch, thus wasting potentiall concurrency. In any event, removing the deferring makes the code much simpler and straight forward. It even looks less efficient this way since the config load is more eager now, but that's actually more optimal because at this earlier point, we're actually doing something else at the same time (start server), which is a good time to do stuff.
- Loading branch information
Showing
3 changed files
with
69 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters