Forum Moderators: coopster

Message Too Old, No Replies

Fast page loads with php

         

Matrixster

7:38 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



Is there any noticable difference on how fast a page loads that has one php include file versus a page that has say 5 php include files?

lobo235

8:01 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



If your site is not too busy then you probably won't see much of a difference. If you are going to be handling a lot of requests then it will slow down considerably. Each time you do an include it has to access the filesystem and get the contents of the file. The more includes you do, the more load you put on your server.

Matrixster

2:18 am on Aug 25, 2005 (gmt 0)

10+ Year Member



So I should try and combine as many of the includes as i can?
For example: header and footer links in the same include rather than seperate.

lobo235

2:31 am on Aug 25, 2005 (gmt 0)

10+ Year Member



I would recommend it. By combining them you will find it's harder to manage your include file. I find it's helpful to divide it into sections using like a three line comment or something so you can easily find the sections of the include file you are looking for.