ok, everytime a page is called php loads all the file that are requested,
php then compiles the whole thing, and only runs what you tell it to
(obviously). if you have a library with 100 huge functions yet you dont use
not one of those functions other then loading time to load that huge file,
the performance will not sufer because you dont call any of those huge
functions. try it.

    function sleep_some()

run this, obviously because I dont ever call that unction, the function is
never called, therfore my app doesnt take 10 seconds to run. now if you had
10 include files 100k each and never called anything in there, well ya its
going to take a little while, thats alot of code to be loading. if you have
a simple C app that loads 10 huge shared libraries that it doesnt do
anything with, well ya, same deal, it'll take awhile longer then without.
the obvious question is why are you loading 10 100k libraries that your not
going to use ? only put relevant data in your libraries and only call
relevant libraries and you wont have a problem.


  Chris Lee

"Bora Paksoy" <[EMAIL PROTECTED]> wrote in message
> Hi;
> I have a question regarding includes and writing
> library modules in PHP.
> In one of the replies to my previous e-mail,I was told
> that PHP parses/compiles pages everytime a new request
> comes in. So, does this mean we have to minimize the
> amount of code per page (which also means to minimize
> number of includes) to improve response time? I mean,
> usually in many programming languages, it is a common
> practice to gather shared functions in a library and
> include/import them from individual scripts. But, in
> case of PHP, given that this library will also be
> parsed/compiled per every request, is this a bad
> practice? What is the alternative to this? Replicate
> functions that are used in scripts in every page?
> Thanks,
> Baho
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to