Experiment with using a proxy to lazify imports
Categories
(Firefox :: General, task, P5)
Tracking
()
People
(Reporter: mossop, Unassigned)
References
(Blocks 1 open bug)
Details
The defineLazy(Module|Service)Getters? can be switched to instead return a proxy import to see if that works. Should test perf too.
Comment 1•2 years ago
|
||
This is going to be handled after the first phase of in-tree migration with direct conversion without semantic change.
The API design depends on what kind of interface people want with more standardized ES module style (instead of for JSM style).
The current possible choice is to make the namespace object a proxy, so that no special operation is done on it and just handling the get
is sufficient.
Making the imported symbol lazy is too difficult to handle in general. because the symbol can be primitive, or class, that a regular proxy cannot handle properly.
The other option is to look into making the similar thing specced: https://github.com/tc39/proposal-defer-import-eval
Updated•2 years ago
|
Description
•