WordPress.org

Ready to get started?Download WordPress

Forums

Expanding (4 posts)

  1. Keith Eckstein
    Member
    Posted 3 years ago #

    Sorry if this has been asked before - I couldn't find any reference to it.
    Basically, 2 questions....

    1). Is is worth my while replacing <?php get_footer(); ?> with the actual html of my footer.php?

    I'm trying to speed up my website http://www.aTasteofGarlic.com and have so far reduced load time from 4.7 seconds to 2.8 seconds - partly by installing W3 Super Cache but also by tidying up the database, reducing image size and replacing PHP database calls by static html links (where possible.)

    By replacing <?php get_footer(); ?> with the actual html, I reduce the number of PHP calls by one - is this worth doing or, is this a NO-NO for reasons that I'm not aware of?

    Obviously, I could do this with every file that calls <?php get_footer(); ?>

    I could potentially do the same with <?php get_sidebar(); ?> as my sidebar.php is very simple.

    I'm aware that the template would become less portable as a result.

    2). All the PHP files have a lot of white space and some comments - is it worth while compressing these files?

    i.e. changing

    <!-- End of that bit of the file - I updated this on 29/02/1966 -->
    </div>
           </div>
    
                  </div>
                  <!--  Don't forget that last div!  -->
    
    </div>

    to

    </div></div></div></div>
    Here's hoping that someone can help me to understand this...

    All the best

    Keith

  2. jonradio
    Member
    Posted 3 years ago #

    The changes you mention (but haven't done yet) are not going to make a measurable difference. You may actually be measuring, with your 2.8 seconds figure, the delay associated with your Internet connection from your computer to the Internet, and not the website to the Internet. I say this because I saw subsecond (less than 1 second) viewing of your home page on my first visit ever, i.e. - no browser caching at my end.

    As a Computer guy just months away from the 40th anniversary of my first Computing course in University, and trained from the beginning about Performance, I feel safe in saying that the Cache concept provided by the plug-in you use is 95%+ of your performance improvement. Having to regenerate a page for each visitor versus storing the pre-built page in memory is a huge drag on performance at the web server end of it.

  3. jkovis
    Member
    Posted 3 years ago #

    W3 Super Cache should be converting most of your site into html and caching it so messing with footer.php or whitespace probably won't have a noticeable effect.

    What kind of hosting plan to you have?

  4. Keith Eckstein
    Member
    Posted 3 years ago #

    Adiant and Jkovis - thanks for your replies.

    I live in rural France and struggle with a 512Kbs connection (normally I use a caching proxy server and caching DNS server to help but I've switched those off to give me real results.)

    Now that I think about it, I suppose that W3 Super Cache is pretty much doing what I had planned to do.

    jkovis - I've got a dedicated server but it's very much last years model - only 2GB of RAM.

    I only get about 800 visitors a day to Garlic (about 5,000 spread across all my sites on that server) so I'd imagine it should be powerful enough?

    Anyway, thanks to both of you for your replies - I'll stop faffing around and let the Cache plugin do the work.

    All the best

    Keith

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags