Solved

Reason for High TTFB

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

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This Micro Tutorial demonstrates how to quickly find related content for YourTango's posts using MozBar Chrome extension.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

12 Experts available now in Live!

Get 1:1 Help Now