Extend deferred library imports to web workers #48813
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
type-enhancement
A request for a change that isn't a bug
web-dart2js
web-dev-compiler
As of now, deferred library imports can tremendously speed up the initial load of web apps as well as the startup time of Flutter applications; they create much more modular binaries and allow to tweak performance of applications.
I would like to propose a similar approach for web worker support on web.
here, I could imagine of different approachs:
file.dart.js_N.part.js
(recommended)Alternatively, it an approach with a Isolate-like API does not work, a web worker specific interface could e.g. look like:
a) (recommended)
b) (bad approach)
This option would introduce a new import syntax extension exposing a
using
statement followed by some helper. That sounds like a bad alternative.I would kindly ask to discuss the provided ideas on useful web worker support, as the current way to go is neither user, nor developer friendly.
The text was updated successfully, but these errors were encountered: