Question on speed/efficency
Moderator: General Moderators
Question on speed/efficency
I'm not sure if this should go under PHP Theory, but as that says advanced only and I'm sure this is far from advanced, I'll put it here.
I have the option of making a series of pages dynamically generated from one file, content from an sql database. Or I could split it to several pages each pulling the content from the sql database.
My question is, if several hundred users visit the site, will there be problems pulling all those pages from one file? Would it be faster or more efficient to have seperate pages, so all the traffic isn't directed to one single file?
- SystemWisdom
- Forum Commoner
- Posts: 69
- Joined: Sat Mar 26, 2005 5:54 pm
- Location: A Canadian South of the 49th Parallel
Im not 100% sure, but I believe it would be better to use a single page system, where users are all calling on one page only. The page requests can still be cached on the server side, so multiple requests for the same file will receive the cached file in either situation anyway..
Pages generated from one file also helps speed up development IMHO by basically laying down a framework from which you can add pages without having redundant code carried over in every other page you create..
Eg. if you had 5 pages that shared a common header page, you would have redundant include() code in each of those 5 pages, and if you had to change the code for any reason, you would have to change it in all pages that share that code..
And ya, I think this should be in the Theory section too..
Pages generated from one file also helps speed up development IMHO by basically laying down a framework from which you can add pages without having redundant code carried over in every other page you create..
Eg. if you had 5 pages that shared a common header page, you would have redundant include() code in each of those 5 pages, and if you had to change the code for any reason, you would have to change it in all pages that share that code..
And ya, I think this should be in the Theory section too..
-
Bennettman
- Forum Contributor
- Posts: 130
- Joined: Sat Jun 15, 2002 3:58 pm