ocLazyLoad icon indicating copy to clipboard operation
ocLazyLoad copied to clipboard

Modules that loaded ordinarily in 5 seconds now takes 265 seconds to load lazily

Open motin opened this issue 8 years ago • 2 comments

I recently setup ocLazyLoad in an Angular-app that was loading something like 150 controllers/services/js-libraries etc. Only about 10 was necessary for rendering the main landing page, and with lazy-loading, that landing page now renders in 3s instead of 8s. Awesome!

But... routes that require the remaining 140 modules now take several minutes (around 265s last time i tried) to load instead of 8s.

What is the general advice in this situation, knowing that angular without ocLazyLoad loads these 140 modules in 5s?

motin avatar Jan 20 '17 13:01 motin

@motin , did you solve this issue?

dbelieves avatar Mar 03 '17 10:03 dbelieves

Thanks for checking up on the issue :) No, had to work around it by only loading specific modules at specific places in the application. This is better architecture, but I think there is an inherent performance issue with the lazy-loading mechanism at the moment since lazy-loading takes about 40 times longer time than loading them all at bootstrap time.

motin avatar Mar 03 '17 10:03 motin