Re: validation extension

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: validation extension
References: 1 2 3 4 5 6  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1160@lists.php.net to get a copy of this message
On Sat, 14 Aug 2004, Christian Stocker wrote:
Yes, the caching of dom trees with apc would be a great feature. I have not much of an idea about how APC really works internally (I just know the concept of opcode caches..) nor am I a big Zend Engine expert. But one of the main problems with libxml2 dom trees could be, that it's not just a flat array/struct/union/whatever, but a linked tree of all the nodes in the XML document. Therefore it's not done with just copying DomDocument to shared memory, you have to copy all the nodes and related information to it, as well. Maybe the solution is easy and I just don't see it due to lack of knowledge on my side, but libxml2's memory management is one of the complexer ones I've seen ;)
That's not all that different from what needs to be done to do opcode caching. You have to cache the main opcodes, but also separately worry about the classes and the functions by copying these to shared memory using the APC allocator.
And furthermore, does APC already work on PHP 5? Just wondering...
No, not yet, but that's just a matter of someone sitting down and doing it. Nothing wrong with getting something like this going in PHP4 first. -Rasmus

« previous php.pecl.dev (#1160) next »