I have been working over a site that uses Durandal framework mostly based on requirejs. I have created the site but the load time was very large of the landing page. I analyzed it using network tab and the waterfall graph. I found that there were around 37 requests sent that were slowing down them as require js loads all the modules needed first and (i.e. main.js which in turn loads others) then renders the page. So I used the r.js optimizer using node.js over the main.js and created a bulid.js file that includes the dependencies. This reduced the number of requests to 26 but eventually the size of main.js grew larger. Here are some of the issues i am into: 1. For the first time the loader stops (at ~20s) after loading require.js and hence could not find/ load main.js properly. 2. For some of the modules after loading require.js the TTFB is very high. Is this one of the problems of slow loading? 3. Is almond a good alternative to replace require.js. Will it make site fast? Here's the build.js file used to optimize the main js. And here's the url of the site: test-gf.comeze.com
No responses yet.