Re: [Fwd: XML_Indexing proposal]
| From: | Olivier Guilyardi | Date: | Thu, 02 Dec 2004 13:46:43 +0000 |
| Subject: | Re: [Fwd: XML_Indexing proposal] | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34724@lists.php.net to get a copy of this message | ||
Hi Bertrand,
bertrand Gugger wrote:
I'd say : "supports the most usefull subset of XPath's syntax for what a big XML file is expected to contain (ie: a lot of repetitive blocks, as RDF)"XML_Indexing does /not exactly supports XPath/. It uses an XPath like syntax, to easily locate a subset of the whole XML document. The rule, in this regard, is that any of the supported expressions must be valid XPath, but the opposit isn't true.< You could say: "supports the most usefull subset of XPath's syntax"
< usefull=80% < what 80% you mean ?"The idea is to address about 80% of the needs when it comes to accessing big xml files." I expect (around) 80% of _big_ xml files to require simple XPath statements.
Examples are there but not what the input is ('test.xml') nor what output should.Actually I used (mozilla's) RDF files for testing and benchmarking, as mentioned in the Benchmark section. The output, for now, is raw extracted XML data, but I may provide support for direct extraction of DOM objects.
OK for bench: what machine, what disk, what is millisecond ?The benchmark shows "speed ratio", for example with a 2 MB file, XML_Indexing+DOM is 40 times faster than pure DOM. It is not absolute timings, which would be dependent on my system disk/cpu/etc... but relative "ratios". However, for information my test system is : - Linux Debian Woody / PHP 4.3.4 / PHP 5.0.2 - Single-CPU Duron 700Mhz - 320 Mb RAM - IDE disk for which hdparm reports : 31 MB/s
In the code, what is the need for circle include/require the base XML/indexing ?The call to include_once 'XML/Indexing/Builder/Numeric.php' in XML/Indexing/Builder.php is part of a workaround for a bug in PHP5 expat lib, and therefore is only performed with PHP 5.x versions. For normal operation, one should always instantiate the driver class directly, that is : XML_Indexing_Builder_Numeric. Thanks for your review :-) But, the proposal and voting periods did end, and my post concerns the process of establishing XML_Indexing as an official PEAR Package. -- ogI mean include_once 'XML/Indexing/Builder/Numeric.php'; in 'XML/Indexing/Builder.php'; and thenrequire_once 'XML/Indexing/Builder.php';in 'XML/Indexing/Builder/Numeric.php';