Current time: 12-11-2017, 09:12 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
10 +sec to first byte
11-03-2014, 08:15 AM
Post: #1
10 +sec to first byte
we recently upgraded the version of our store and now we have a slow load time and the vendor wants to sell us an optimization package. I enabled gzip compression but that didn't help. Most of the load time is in the time-to-first byte. There's a long block of java code at the head of one of the css files. Any suggestions on how I might clear this slow load? This seems to be the priority over the other issues, like image compression. Thanks for any advice.

site size: 456 kb
server requests: 34
server type: apache

http://www.webpagetest.org/pagespeed.php...1&cached=0

Details:
First Byte Time (back-end processing): 0/100

11311 ms First Byte Time
ms Target First Byte Time

Defer parsing of JavaScript

433.8KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.

I saw this code from earlier posts on the site. Would adding that to the body work, as was suggested?

<script defer="defer" type="text/javascript">
window.onload=function(){
var mycode;
mycode=document.createElement("script");
mycode.type="text/javascript";
mycode.src="http://www.example.com/path/yourjavascriptfile.js";
document.getElementsByTagName("head")[0].appendChild(mycode);
}
</script>

</body>
Find all posts by this user
Quote this message in a reply
11-04-2014, 02:34 AM
Post: #2
RE: 10 +sec to first byte
Ignore all of the PageSpeed recommendations, they are going to be for making the front-end faster (everything after the first byte).

You also don't need an "optimization package" whatever that is.

Something is very broken with the code on the server. Do you have access to the actual application code and a developer that can look into it? For something that is reliably taking that long my first guess would be that the server code is trying to talk to another server and timing out and you just need to figure out what it is.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-04-2014, 03:47 PM
Post: #3
RE: 10 +sec to first byte
The cynic in me says the vendor will be removing that 'sleep 10' commend from index.php file when you pay for that package (:

As well as following Patrick's suggestions, it could also be a delay caused by the server infrastructure. I get the feeling that you're running a shop on shared hosting, and most modern eCommerce packages ( I work mainly with Magento, and have never used X-cart so take this with the proverbial pinch ) need shedloads of memory and CPU power to efficiently drive the database and PHP. You'll probably find that the best move forwards is to go for your own server - dedicated or virtual - which will provide you with the ability to view into what's going on and where the bottlenecks may be.
Find all posts by this user
Quote this message in a reply
11-04-2014, 11:52 PM (This post was last modified: 11-04-2014 11:56 PM by jaccobb.)
Post: #4
RE: 10 +sec to first byte
The store is hosted on Apache server, so I have access to files from the Plesk desk and FTP. We don't really have a developer relationship but can probably find someone. I'm more R programmer than web designer but could I potentially trap this by examining the code with Firebug?

That makes sense. Looking at the load time details it says that about 10 seconds is being consumed by "waiting".


(11-04-2014 02:34 AM)pmeenan Wrote:  Ignore all of the PageSpeed recommendations, they are going to be for making the front-end faster (everything after the first byte).

You also don't need an "optimization package" whatever that is.

Something is very broken with the code on the server. Do you have access to the actual application code and a developer that can look into it? For something that is reliably taking that long my first guess would be that the server code is trying to talk to another server and timing out and you just need to figure out what it is.

ha. Thanks for the pointer. I'll be going back to the vendor and pressing them a little. My take is they deliberately left something in the code that could easily be removed.

Thanks for the helpful advice.


(11-04-2014 03:47 PM)GreenGecko Wrote:  The cynic in me says the vendor will be removing that 'sleep 10' commend from index.php file when you pay for that package (:

As well as following Patrick's suggestions, it could also be a delay caused by the server infrastructure. I get the feeling that you're running a shop on shared hosting, and most modern eCommerce packages ( I work mainly with Magento, and have never used X-cart so take this with the proverbial pinch ) need shedloads of memory and CPU power to efficiently drive the database and PHP. You'll probably find that the best move forwards is to go for your own server - dedicated or virtual - which will provide you with the ability to view into what's going on and where the bottlenecks may be.
Find all posts by this user
Quote this message in a reply
11-05-2014, 04:00 AM
Post: #5
RE: 10 +sec to first byte
If you have the ability to install something like newrelic on the server, even the free/trial level will tell you exactly what code is causing the problem.

For something that is consistently and reliably 10 seconds I don't think it's going to be a server performance issue. That feels very much like a timeout for some action that the server-side code tried to do.

Whatever it is won't show up in Firebug which is on the client side. The server code is a complete black box from the outside. Something like newrelic will automatically instrument the server and tell you where the time is being spent. Otherwise you can also add a bunch of logging/timestamps to the code until you narrow down the culprit.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-07-2014, 12:45 AM
Post: #6
RE: 10 +sec to first byte
ok, thanks for the trouble-shooting advise. I'll be working on this tomorrow, so I might have a follow-up question.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)