Solved

Reason for High TTFB

Posted on 2016-09-30
1
98 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SuperAntiSpyware Licenses Discounted by 25% !

Exclusive offer to Experts Exchange Members!
Buy SuperAntiSpyware License(s) from us and save 25% on the regular purchase price.
- Includes Full SuperAntiSpyware Vendor Support Entitlements
- Your Subscription does not begin until you activate your license
- Buy for your friends

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
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
This Micro Tutorial will demonstrate how to updated your Facebook updates after changing anything in the title or description of a shared article.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

740 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