Support » Themes and Templates » Load time vs. template files

  • Is there any relation between how fast a site loads and the number of template files used?

    In other words — with all other things being equal — which site would load faster:

    Site 1, consisting of:



    Site 2, consisting of:


    Is there any difference, at all?

Viewing 4 replies - 1 through 4 (of 4 total)
  • whooami



    Everything else being equal, same amount of images and extraneous stuff? It wouldnt make a bit of difference.

    So, it doesn’t take more time to asseble a page from more template files as opposed to putting it together from one template file?

    Also, is there a difference (in load time) between the default WP template files (index.php, archive.php, etc.) and custom template files (called via php includes)?




    uh, are you counting in milleseconds? IF theres a difference, thats what it’s measured in.

    And ALL template files (for all intents and purposes) are already called via includes, so no, there would be no difference between that and “custom template files” (see wp-includes/template-loader.php for proof).

    Fwiw, you left sidebar.php, header.php, and footer.php off your list. I see why, but all the same unless your being completely all-inclusive with the code within all of those other files……. (see where im going with this?)

    Aditionally, and this is where all things become NOT so equal. If you were to apply all of the code inside comments.php to your index.php (youve assigned comments.php to the extra theme files list, when really its not one, so its a good example) — you would need additional PHP within index.php to indicate when comments.php should be displayed.. all of the time, or single view, etc.. All of a sudden you’ve added some PHP to do decision making.. hmm, things still equal? I dunno.

    Good points, whooami! Thanks! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Load time vs. template files’ is closed to new replies.