If you use EmterpreterAsync it pulls in the whole Browser object, which is about 30KB of code. The majority of this is not required by EmterpreterAsync. It would be possible to separate out Browser.mainLoop and the handful of other functions which are needed (resumeAsyncCallbacks, pauseAsyncCallbacks, etc.)
While it may be possible, I'm not sure how much work it would be or whether it would be worth it... but it doesn't hurt to post an issue suggesting it.
This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
I haven't looked at this for a while. Is Browser still included with the new ASYNCIFY mode?
@curiousdannii looks like it is. For similar reasons, it needs to check the main loop, uses asyncLoad, etc.
I agree it would be nice to refactor those out. However, I hope this already would be pretty well minified when closure is enabled, as it can remove unneeded properties of things?
Ah, I haven't used Closure. Guess I'll give it a try.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.
I think this would still be nice to do. Could be a useful refactoring!
I no longer need this, #12181 removed mainLoop itself from my output. But I'll still keep working on it as it will probably be helpful for others.