Solved

Reason for High TTFB

Posted on 2016-09-30
1
62 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 18

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 Searchbox Branding 11 78
The Best Website Creation Tools 14 55
paypal ipn url 5 58
Best environment for cross platform web development? 5 45
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This Micro Tutorial will demonstrate how to updated your Facebook updates after changing anything in the title or description of a shared article.
This Micro Tutorial demonstrates in Google how to submit a page to get it crawled quickly or recrawled after making changes that you wan tot show up in Google.

809 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