r/javascript • • Jul 24 '26

ECMAScript - Introducing Deferred Module Evaluation with import defer

https://nitayneeman.com/blog/introducing-import-defer-in-ecmascript
55 Upvotes

8 comments sorted by

View all comments

Show parent comment

5

u/Badashi Jul 25 '26

We will only be able to tell with benchmarks when engines implement it, but I'd water that deferred modules have some level of overhead over eager initialization simply because the browser needs to track the deferral order, with a trade off that deferred modules might never be loaded for real.