Re: Speed concerns with OOP and PHP4
| From: | Maxim Maletsky | Date: | Thu, 16 Jan 2003 13:39:17 +0000 |
| Subject: | Re: Speed concerns with OOP and PHP4 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131851@lists.php.net to get a copy of this message | ||
"John Wells" <jb@sourceillustrated.com> 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
maxim@php.net