Solved

Reason for High TTFB

Posted on 2016-09-30
1
34 Views
Last Modified: 2016-10-06
HI,
On loading my web application i see the jquery.min.js is taking a lot of time. Here is the details in network tab :
Screen-Shot-2016-09-30-at-2.17.09-PM.pngI have uploded the jquery.min.js on my server and this is like making my application really slow... Just 24 KB and it takes 1.3 s to download it...
Any suggestion on improving the performance of this ?
Also this happens randomly...sometimes the file will get downloaded in 200 ms also.
This is have noticed for other files that are getting downloaded sometimes the TTFB is around 2 seconds for a file otherwise most of the times its fine...

Thanks
0
Comment
Question by:Rohit Bajaj
1 Comment
 
LVL 17

Accepted Solution

by:
xtermie earned 500 total points
ID: 41823207
Well, the reasons for slow execution:
  • the server requests takes a long time (slow PHP script)
  • you got other processes running that take up CPU power
  • your web server kills idle worker processes, having to start them again when you do your requests
  • Chrome (or any other browser you may use) will only execute two requests to the same server at once and will queue others, making them seem slower
So you can try to:
1)  Run a browser debugger like Firebug in Firefox or the Chrome inspector that lets you watch the network requests. Verify that the issue is the time between when the HTTP request is sent to your server and when the response is received. Once verified, you have nothing further to do in the browser - go fix the server to respond faster.
2) Make sure its not getting stuck in loops longer than it needs to, etc. make sure your server is configured correctly, THEN crack open the profiler.
3) Do something for faster execution.  for example: compress your .js file, quality source code and Sql query in the server side. also, you can link to these links in follow instead of use js lib in your page:
 Google Ajax API CDN – http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
 Microsoft CDN – http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js
 jQuery CDN – http://code.jquery.com/jquery-1.6.2.min.js
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
This Micro Tutorial will demonstrate using MozBar to view an article that was deleted from the Search Engine Watch site after being debunked by Google.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now