You are here: Re: [PHP] Question about including files and server load « PHP « IT news, forums, messages
Re: [PHP] Question about including files and server load

Posted by Edward Vermillion on 10/14/05 16:58

Richard Davey wrote:
> Hi Jay,
>
> Friday, October 14, 2005, 2:21:57 PM, you wrote:
>
>
>>I was wondering isn't this putting a bigger load on a server by
>>including so many files for each function? Also, I was wondering
>>what everyone's opinion was on this approach in terms of
>>maintenance. Do you think it's better practice to put all your
>>functions in one file or do it in this manner?
>
>
> How many are there? I don't use functions in that way, but I do a
> similar thing for class files (minus that "definedfucntions" part of
> course).
>
> You could of course combine them all together, and yes it *would* be
> faster for the script to execute as there is far less drive activity
> going on. But then it's a trade-off between maintaining that single
> massive file, as opposed to updating smaller chunks. If it's a real
> issue looking at something like Zend Encoder would help.
>
> Cheers,
>
> Rich

Isn't it more work for PHP, or rather the Zend engine, to keep track of
a bunch of functions that aren't being used, not to mention the memory
it takes to load in one huge file. I agree that putting each function in
it's own file is going a bit too far in the other direction.

I tend to group functions together by purpose into seperate files. Kind
of a happy medium. You don't have a bunch of includes in the code and
you don't have a bunch of functions in memory that aren't being used.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация