Instantiation of class objects
| From: | szii | Date: | Thu, 21 Dec 2000 22:43:06 +0000 |
| Subject: | Instantiation of class objects | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42087@lists.php.net to get a copy of this message | ||
I'm not sure if this is PHP related, or more Zend related, but
I'll post it here first.
When instantiating new objects, the Zend engine doesn't
seem to be caching them. Ie, we run a PHP page which
calls new on an object. Then we shutdown the socket and
do it again..and again...and again.
The times do not decrease (as I would expect with caching)
and doing exactly the same functionality WITHOUT using
a formal class nets us 100% increase in speed. This is
WITH the bware caching - turning it off makes no
difference either. That "new" allocater seems heinously
expensive.
It was my assumption that the Zend engine did garbage
collection and would re-use objects in it's cache prior
to making expensive memory allocation calls. Bad
assumption?
TIA!
-Szii