[PHP] Speed concerns with OOP and PHP4

2003-01-16 Thread John Wells
I'm working on a large VB/Sql Server to Php/Postgresql conversion (approx.
60k lines of code).

I'd like to design this thing as OO as possible, because I think
ultimately it leads to better, more extendable and readable software. 
However, since php does the whole copy thing with objects, I'm a little
concerned.

Is this deficiency on the part of PHP 4 something I should be concerned
about?  If I have a 60k loc fully object-oriented php app with a large
amount (approx. 500 or so) queries to a db, am I making a mistake by going
OO?  Will it really slow down the app *that* much, or consume memory like
a pack of hungry piranhas?

Thanks for the input, guys.

John





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Speed concerns with OOP and PHP4

2003-01-16 Thread Maxim Maletsky

John Wells [EMAIL PROTECTED] wrote... :

 I'm working on a large VB/Sql Server to Php/Postgresql conversion (approx.
 60k lines of code).

First of all, VB is precompiled and PHP is not. This will already be
slower. So, you gonna need to create a logic that loads only the
necessary classes for every request. In VB you wouldn't probably need it.

 I'd like to design this thing as OO as possible, because I think
 ultimately it leads to better, more extendable and readable software. 

Good idea.

 However, since php does the whole copy thing with objects, I'm a little
 concerned.

 Is this deficiency on the part of PHP 4 something I should be concerned
 about?

Depends al on the logic you will give to it.

 If I have a 60k loc fully object-oriented php app with a large
 amount (approx. 500 or so) queries to a db, am I making a mistake by going
 OO? 

500 queries wan't really matter because it has few to do with OO/PHP.
60k of code, if all together on the same request will be definitely slow.
So, make sure that *only* the required classes are loaded on each
execution.


--
Maxim Maletsky
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php