Purpose of Lazy Loading in Ember Engines? Meaning of Set LazyLoading as True or False?

#1

//index.js

lazyLoading: true,

isDevelopingAddon() { return true; }

Also Why We use the above lines in index.js. Kindly Clarify.

0 Likes

#2

Well `isDevelopingAddon’ is just for triggering live reload updates on changes (see the ember cli docs). Engine lazy loading is a way to keep your initial app bundle size smaller, only loading the engine (from a separate file) when it is first requested.

From the engine docs:

Lazy loading - An engine can allow its parent to boot with only its routing map loaded. The rest of the engine can be loaded only as required (i.e. when a route in an engine is visited). This allows applications to boot faster and limit their memory consumption.

And there’s a section in the ember engine guides about it.

3 Likes

#3

Thanks for getting back. Understandable Reply.

0 Likes