Re: Improving speed (long)
| From: | John Lim | Date: | Tue, 19 Mar 2002 17:31:09 +0000 |
| Subject: | Re: Improving speed (long) | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5042@lists.php.net to get a copy of this message | ||
> So IMHO the functionality could be splited in three parts:
>
> No Manipulation: query, get*, prep/exec, datatypes (default)
> Manipulation: sequences, transactions
> Extra: schema managment, cache
>
> The "how" question is more difficult to answer :-). I see some ways:
>
> 1) by aggregating methods as Stig proposed (cool as it can happen
> automaticaly but no support for almost no PHP4 installations).
>
> 2) by extending and preselecting the mode (will need knowledge of what
> is avaible in each mode but will be supported by all PHP4 releases).
>
> 3) by having different objects for the different modes and some kind of
> "object manager" to create, comunicate and handle them (no need of
> preselecting the mode, supported by all PHP4 releases but perhaps tricky
> to code).
>
>
> Tomas V.V.Cox
Hi Tomas,
Nice summary of the issues. Regarding "how":
Aggregation (1) is an idea, but what about backward compat?
Furthermore does anyone have benchmarks using it?
For speed, I like (2) extending and preselecting
using classes. Different classes in the same hierarchy could
have different functionality. Eg.
class MySQL_Primitives { }
class MySQL_Standard extends MySQL_Primitives { }
class MySQL_Extended extends MySQL_Standard { }
The user just chooses which class to use, based on his/her
needs.
(3) I don't really see how an object manager really helps.
The user should choose the mode, not the object manager.
Regards, John