Fabian Lurz
Fabian Lurz

Reputation: 2039

Loading delay on my website

I build my frontend with angularjs and i'm not satisfied with the performance. I used a lot of best practices for angularjs (such as ::) - but still - i have a strange delay and i don't know where it comes from. See this image:

enter image description here

Between 1000ms and 1600ms not much is happening. Has anyone experienced that with angularjs and any hints how to solve that?

My website: https://migranthire.com


Its not 100% right that nothing is happening - its loading templates for directives. But why is that taking 600ms? The templates are really really small.

Upvotes: 1

Views: 215

Answers (1)

shaunhusain
shaunhusain

Reputation: 19748

You appear to be suffering from a few performance problems first thing I'd address are the TTFB since that can likely be solved through some server configuration adjustments. Check the Timeline by selecting a network request and hitting the Timeline tab to see more details on what part of the communication it was stalled on (TTFB is what it appears to be from here, meaning the server is taking a long time to respond so not an angular problem but rather server config, or cloudfront). Check resource usage on the server if possible or consider another service where you can or where the response times are better.

On the Angular side of things it's really only useful to Profile non minified code. If you use the non-minified code locally you can go into the Profile tab and record a snapshot or use the main Timeline tab and record from initial load and then look at the bottom up view of script execution to see where it spends the most time.

To take angular out of the equation you can use curl and time.

time curl 'https://migranthire.com/pages/landingpage/landingpage.d9acd03520f27796.html' -H 'Pragma: no-cache' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8' -H 'Accept: text/html' -H 'Referer: https://migranthire.com' -H 'Connection: keep-alive' -H 'Cache-Control: no-cache' --compressed

Upvotes: 2

Related Questions