Hacker News new | ask | show | jobs
by camus2 4500 days ago
> when needed. I.e. instead of loading one giant chunk

IMHO , The problem is the user is waiting for the functionality to be loaded,not a great user experience especially on mobile,where connectivity can be bad."Bulk" loading is usually cheaper than multiple requests to load parts of an application.

I usually load all the code required upfront,even data is fetched and cached in the background so my users dont have to wait while browsing multiple pages of a listing , for instance. I would never use async module loading in production. It often fails according to my tests.

Maybe using amd during development makes sense on some projects but not in production.

1 comments

I am glad that you app can be actually served as one packaged piece without download size having any effect on performance. In my case loading everything is slower then loading needed pieces when needed. I am not talking about loading each view separately, i am talking about splitting application into "sections" and load each one when context is switched.

And yes, what we do here does make sense in production.