Re: validation extension

From: Date: Sat, 14 Aug 2004 11:05:18 +0000
Subject: Re: validation extension
References: 1 2 3 4 5  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1157@lists.php.net to get a copy of this message
Hi 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 ;) And furthermore, does APC already work on PHP 5? Just wondering... chregu On 14.8.2004 12:38 Uhr, Rasmus Lerdorf wrote:
The obvious advantage of having just a central XML file is that you just parse it once on startup and you don't have the per-request parsing overhead. But I agree with you that it is much more convenient to separate the rules. Hence the idea of treating the rule files just like APC-cached PHP scripts, except instead of caching op_arrays we would be caching DOM trees. It wouldn't even be that hard to hack up APC to support this. Key them off of the device+inode of the XML file and hack up the apc_cache_entry struct with a flag and a union that replaces the op_array, class list and function list with whatever we would need for a DOM tree. The filename and ref_count would be the same for both types. Perhaps the most flexible approach would be to simply add a bitfield flag and turn the existing entries into void *'s. -Rasmus On Sat, 14 Aug 2004, nick loeve wrote:
Yeah i saw that. I am trying a different approach in that cleaner uses rules that are page and context independant. I also want to be able to use smaller different xml files to house the rules. Valkyrie has one central file. Andrey Hristov wrote:
As far as I remember there is pecl module valkyrie (interesting name :) . More information here : http://pecl.php.net/package/Valkyrie
-- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB

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