SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member Emphacy's Avatar
    Join Date
    Aug 2012
    Location
    Newcastle upon Tyne UK
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs down What is the cause of website waiting times?

    I've been developing a new WordPress Theme and it's fair to say I'm a little disappointed with its loading times.
    After testing it with Pingdom Tools it achieves somewhat random scores (between 70 and 90) and loading time takes around 3 seconds - Far too long!

    According to its analysis most of the time is spent waiting for the actual domain (the first request) - This has a waiting time of 2 seconds and nothing else even gets requested until this finishes.
    You can see the analysis here:

    http://tools.pingdom.com/fpt/#!/Ce8A...swebspace.com/

    It would be much appreciated if any of you experts could explain what is or may be causing such a ridiculous waiting time. I'm not sure I can blame this on my hosting since the default WordPress theme "TwentyEleven" loads rather quickly.

    Thankyou.

  2. #2
    Founder of Primal Skill Ltd. feketegy's Avatar
    Join Date
    Aug 2006
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Verify the following:

    1. DNS is set up correctly
    2. Redirects in Apache conf, htaccess files are all correct, or if you're using some other webserver then check the specific configs.
    3. Application level bottlenecks. Use a profiler like xdebug (with webgrind) or xhprof to see where your bottlenecks are in the source code.

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,849
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Emphacy View Post
    I've been developing a new WordPress Theme and it's fair to say I'm a little disappointed with its loading times.
    After testing it with Pingdom Tools it achieves somewhat random scores (between 70 and 90) and loading time takes around 3 seconds - Far too long!
    Wordpress is a big bloated script. A 3 second load time (from the time you hit the Enter key to when the site renders in your browser) is quite reasonable. But that isn't the problem with your site.

    Your site has 73 requests to servers. That is an awful lot. You have 5 CSS files, 16 Javascript files, and you are pulling some of these files from external sites like Facebook and Google (for ads). Your main page has 17.21 kB of HTML and 660 kB of CSS, JS, images, and who know what else. Not very efficient if you ask me. All this takes time to load.

    Given how much stuff your site is pulling in, I think it loads very fast. And I don't know what kind of Wordpress plugins you might be using, which will cause even longer load times.

    Quote Originally Posted by Emphacy View Post
    It would be much appreciated if any of you experts could explain what is or may be causing such a ridiculous waiting time. I'm not sure I can blame this on my hosting since the default WordPress theme "TwentyEleven" loads rather quickly.
    I don't think it's your hosting, either. I don't think you have much of a problem at all given how many requests your site makes to CSS and JS files. Your site loads acceptably fast everything considered.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cheesedude View Post
    Wordpress is a big bloated script. A 3 second load time (from the time you hit the Enter key to when the site renders in your browser) is quite reasonable. But that isn't the problem with your site.

    Your site has 73 requests to servers. That is an awful lot. You have 5 CSS files, 16 Javascript files, and you are pulling some of these files from external sites like Facebook and Google (for ads). Your main page has 17.21 kB of HTML and 660 kB of CSS, JS, images, and who know what else. Not very efficient if you ask me. All this takes time to load.

    Given how much stuff your site is pulling in, I think it loads very fast. And I don't know what kind of Wordpress plugins you might be using, which will cause even longer load times.



    I don't think it's your hosting, either. I don't think you have much of a problem at all given how many requests your site makes to CSS and JS files. Your site loads acceptably fast everything considered.
    Yup, as noted above, I would underline the 73 requests to servers part because that's where the trouble lies. You need to optimize those scripts. Isn't there some settings in WP to a) optimize scripts and b) compress the output? I just ran some tests on sites that I built and consider bloated and they had half the number of requests. I'll bet if you optimize all of those script and css files, you'll improve your responsiveness.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  5. #5
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,849
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    If anyone wants to see how bloated Wordpress is becoming, just put this line in your theme's footer.php file right before the </body> tag.

    PHP Code:
    <?php echo '<br/>'count(get_included_files()), ' PHP files were required to generate this page.<br/>';?>
    A default installation of Wordpress 3.4.2 using the default Twenty Eleven theme requires 83 PHP files to generate the index page (up to the point of the footer.php file). That's a lot of files that need to be read, loaded into memory, and executed if you aren't using an accelerator (as most shared servers are not). Add a plugin and that number goes up. Add a few plugins and that number could easily top 100. Wordpress will never be anywhere near as fast as serving up static HTML files.

  6. #6
    SitePoint Member Emphacy's Avatar
    Join Date
    Aug 2012
    Location
    Newcastle upon Tyne UK
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Indeed WordPress is quite bloated but still it is a fantastic piece of software and I'll continue to use it. It's only my theme which seems to be causing loading problems.

    I concluded that over 30 of the requests were being made to facebook, but Facebook being a CDN it delivered all it's stuff in less than 80mS so that's not really the problem.
    The queries to the database took less than 40mS so that's not the problem either.

    Most of the bandwidth was being taken by images despite the fact I've used as many sprites as I can (only 24 image requests). I've done a little bit of work, knocked 6 HTTP requests off and reduced the page size by 90kB.
    Now alot of the time is being taken up by the connect routine rather than wait or receive.

    It's down to around 2.2s. I'll continue to work on it, thanks for the input gents!

  7. #7
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Try optimizing caching on your site and see if that helps. http://wp.tutsplus.com/tutorials/sca...ching-plugins/
    Maleika E. A. | Rockatee | Twitter | Dribbble



  8. #8
    SitePoint Member Emphacy's Avatar
    Join Date
    Aug 2012
    Location
    Newcastle upon Tyne UK
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kohoutek View Post
    Try optimizing caching on your site and see if that helps. http://wp.tutsplus.com/tutorials/sca...ching-plugins/
    I've got caching, I'm user W3 Total Cache. It's fantastic, reduced load times to less than a second but not all people who are going to use my theme will also use a caching plugin. I need to get it up to scratch before I put it in the Themes Directory.

  9. #9
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Got you! If you go to the WP codex, you'll spot a list of links to external resources that deal with optimization of a WP site: https://codex.wordpress.org/WordPress_Optimization

    Perhaps you've already gone through these, but it you haven't, perhaps there's some info that you can use.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  10. #10
    SitePoint Enthusiast pothi's Avatar
    Join Date
    Aug 2008
    Location
    Rajapalayam, TN, India
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As already mentioned by cheesedude, your theme seems to be okay in terms of performance. You may compare it with how fast a default theme loads (or with any popular themes in the official WP directory).

  11. #11
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,314
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    Although it's always a good idea to reduce the number of HTTP requests, your Pingdom analysis reveals that that's not your biggest problem yet. A little more than half your total time is spent just waiting for the HTML to be returned. That means the problem is in the PHP of your theme. The usual culprit of slow PHP is database requests. We could give you more specific tips, but we'd have to see your theme code.
    "First make it work. Then make it better."

  12. #12
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,849
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    Although it's always a good idea to reduce the number of HTTP requests, your Pingdom analysis reveals that that's not your biggest problem yet. A little more than half your total time is spent just waiting for the HTML to be returned. That means the problem is in the PHP of your theme. The usual culprit of slow PHP is database requests. We could give you more specific tips, but we'd have to see your theme code.
    But what kind of performance would we expect to see from a shared web host? Also, does the location of the Pingdom test have anything to do with the server wait time (which was 1.59 seconds)? The web server is located in the UK and the original Pingdom test was conducted from a server in Texas, USA.

    http://tools.pingdom.com/fpt/#!/Ce8A...swebspace.com/

    Tested from Dallas, Texas, USA on October 6 at 19:15:11
    I just tested it on a Sunday afternoon (in the USA, evening in the U.K.) using the Netherlands as the testing location and the wait time was 14 milliseconds. But Sunday isn't peak time, not like a week day. And the number of server requests has been reduced down to 37 now.

    http://tools.pingdom.com/fpt/#!/b4au...swebspace.com/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •