Re: DB_Light

From: Date: Tue, 04 Dec 2001 21:29:21 +0000
Subject: Re: DB_Light
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3384@lists.php.net to get a copy of this message
> > On Tue, 4 Dec 2001 20:28:37 +0100, Lukas Smith wrote: > > > I just would prefer not to force the user to make this decision but to > load this added functionality dynamically so the user only loads the > code he actually uses. > > Martin Janson wrote: > > Yeah. If there is way to load parts of PEAR DB only when they are > > needed, we should go this way. +1 > > > > I don't think that it is basically a good idea to use two differents > > classes (light and heavy), that can be used for the same purpose: > > IMO lot's of people will then wonder, whether they need the light > > or the heavy-weight class for their project. I agree a core plus extensions notion might be better instead of heavy-light. > I suggested making packages of methods so that we don't need that many > require_once calls as those are slow That might speed things up a bit. You would need to benchmark the speed up that might be gained by some dynamically loadable methods approach in PHP space to see if we actually get some speed up. I suspect that if you were to bloat PEAR with more features there would come a point at which a dynamically loadable methods would be a superior way to go. One other approach would involve asking the question whether the Zend engine has to go thought a series of steps before it fully instantiates all the methods in a class. If it was possible to tell the Zend engine to create a "ghost method" that would only be half-way instantiated, then you might me able to obtain more speed up if the default behavior for calling non-existent methods was to search the ghost methods and fully instantiate the method if you find it. Regards, Paul

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