I'm trying to speed-up my website. This is what I found in chrome's developer tools inside Timeline/Profile JS. In contains like 150 those blue Parse HTML(in screen).
It's 50% of load time. I tested it using a tablet and this function took even 15000ms! I'm setting route provider like this:
var start = '<div class="important">';
var end = '</div>';
$routeProvider.when('/test', {
template: start + 'some short text' + end
});
What's wrong? Complete size of website is 500kb. It has 97 scopes.
Edit: if I test website without using angular on tablet, load time is 2.5s(as I pointed above with angular it was more than 18 seconds). I'm willing to pay for solution.
I'm also adding timeline data that I debugged(on tablet). You can check a timeline on Chrome. Open developer console(F12). Click tab Timeline. Right click on this tab and then choose Load timeline data.
Edit 2: I'm using angular-material, and I think this might the problem and this might all those parse html's because there are for example lot of buttons.
You didn't post your code, but below the slow makers:
In short solutions below:
Where goes it wrong?
Use a tool besides Chrome developer bar as Batarang to debug and profile your angularjs app. Download it from: https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk
Read more here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With