phpapacheserver-side-includes

SSI or PHP Include()?


basically i am launching a site soon and i predict ALOT of traffic. For scenarios sake, lets say i will have 1m uniques a day. The data will be static but i need to have includes aswell

I will only include a html page inside another html page, nothing dynamic (i have my reasons that i wont disclose to keep this simple)

My question is, performance wise what is faster

<!--#include virtual="page.htm" -->

or

<?php include 'page.htm'; ?>

Solution

  • Performance wise fastest is storing the templates elsewhere, generating the full HTML, and regenerate based on alterations in your template.

    If you really want a comparison between PHP & SSI, I guess SSI is probably faster, and more important: not having PHP is a lot lighter on RAM needed on the webservers processes/threads, thereby enabling you to have more apache threads/processes to serve requests.