Re: Re: Improving speed (long)

From: Date: Tue, 19 Mar 2002 18:02:42 +0000
Subject: Re: Re: Improving speed (long)
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5046@lists.php.net to get a copy of this message
Hi Lukas, > Well ideally the user does not have to choose anything but only use what > method he/she pleases Exactly, so you make the default class that the object factory creates the MySQL_Extended class -- this gives you everything. If you want low-level high speed access and do not want any overhead, tell the object factory that you want the low-level version, eg: MySQL_Primitives_Metabase. Just like you choose assembler for speed or PHP for productivity - give people a choice - they will applaud you. One size only fits yourself :-) Regards, John Lukas Smith <smith@dybnet.de> wrote in message news:001501c1cf6b$933467a0$4d00a8c0@vandal... > Well ideally the user does not have to choose anything but only use what > method he/she pleases. I think that is the goal we are trying to > accomplish. I would even be willing to give up a little bit of > performance in order to reach that goal. > > BTW: please keep these threads cross mailinglist so we all can > collaborate > > Best regards, > Lukas Smith > smith@dybnet.de > _______________________________ > DybNet Internet Solutions GbR > Alt Moabit 89 > 10559 Berlin > Germany > Tel. : +49 30 83 22 50 00 > Fax : +49 30 83 22 50 07 > www.dybnet.de info@dybnet.de > _______________________________ > > > -----Original Message----- > > From: John Lim [mailto:heyjohnlim@yahoo.com] > > Sent: Tuesday, March 19, 2002 6:31 PM > > To: pear-dev@lists.php.net > > Subject: [PEAR-DEV] Re: Improving speed (long) > > > > > > > > > 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 > > > > > > > > > > > > -- > > PEAR Development Mailing List (http://pear.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pear.dev (#5046) next »