Re: News from the PHPLib and Pear Benchmark-Front
| From: | Matthias Mohr | Date: | Wed, 07 Mar 2001 14:14:28 +0000 |
| Subject: | Re: News from the PHPLib and Pear Benchmark-Front | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-1600@lists.php.net to get a copy of this message | ||
Hello,
the include_once statement should only be evaluated *once* or am i missing
something? Is the evaluation-time the connect() function needs, always the
same, if you call it multiple times in one script? (only the database-
type must be the same, not the database itself)
I was not able to figure out, how many times you called connect() to measure
the differences on your result.html and i would guess a second call to
include_once() should be much faster.
Additionaly:
AFAIR you need to connect only once in Pear::DB and can use this object for
multiple queries, since you get a distinct result handle for every query in
Pear::DB. Unlike in phplib where you have to use mulitple instances of
DB_Sql to do queries in nested loops. So perhaps connect() does not need that
much optimization, since it should not be a hotspot in you application.
i do not want to bash phplib against pear or vice versa, i am just curious
regards
messju mohr
On Wed, 7 Mar 2001, Christian Stocker wrote:
> Hi there
>
> i made some more benchmarking tests on the pear::db
>
> i analyzed the connect function in DB.php and it's clearly the
>
> @include_once "DB/${type}.php";
>
> command, which uses 90% of the time in connect(). so it looks like,
> there's a lot to compile in {$type}.php and common.php. and i don't know,
> how to speed that up, apart from deleting code :) any ideas?
>
> see http://nomad.ch/php/result.html for the exact figures.
>
> BTW:
> zend_cache helped a lot (from 9ms for the include down to 0.5ms)
> bware_cache was not faster for the include...
>
> chregu
>
>
--
Matthias Mohr <m.mohr@internet-factory.de> (Software-Entwicklung)
Internet Factory AG, Niederlassung Industriestr. 11, 26121 Oldenburg
Tel: (+49) (0)441 - 77 92 10 Fax: (+49) (0)441 - 77 92 177
http://www.internet-factory.de