2 4XPath Performance test from "Olivier Deckmyn" <odeckmyn.list@teaser.fr>, with import and filename updates
4 Subject: [4suite] 4XPath performance ?
5 Date: Thu, 8 Jun 2000 16:30:21 +0200
6 From: "Olivier Deckmyn" <odeckmyn.list@teaser.fr>
7 To: "4Suite list" <4suite@dollar.fourthought.com>
9 I am playing and testing 4XPath....
10 And I am a little afraid of the results I see...
11 The machine is a Dell Server (2400) with a single PIII-750 and 256MB RAM,
12 USCSI disks (10K RPM), running FreeBSD4.
14 There is a lot of memory, cpu is not used for anything else than the test...
16 With a 100KB xml file, I have applied the attached test1.py
18 Here are the results :
19 QUERY="//author" (no match in the file)
29 QUERY="//date" (few matches in the file)
34 <date> 10 October 1996</date><date>1 August 1996</date><date>17 April
35 1996</date><date> 17 April 1996</date><date> 17 April 1996</date><date> 12
36 April 1996</date><date>27 March 1996</date><date>27 March
37 1996</date><date>23 February 1996</date><date>9 December 1996</date><date>
38 29 November 1996</date><date> 31 October 1996</date>Indexing DOM
42 <date> 10 October 1996</date><date>1 August 1996</date><date>17 April
43 1996</date><date> 17 April 1996</date><date> 17 April 1996</date><date> 12
44 April 1996</date><date>27 March 1996</date><date>27 March
45 1996</date><date>23 February 1996</date><date>9 December 1996</date><date>
46 29 November 1996</date><date> 31 October 1996</date>
50 Indexing is worth the price ! Very quick index build, and 3.5x speed gain
52 But, it very slow anyway :(
54 Is this the "normal" performance ? Can I do better?
56 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
59 <script src=
"../../../../resources/js-test.js"></script>
62 <div id=
"console"></div>
66 req
= new XMLHttpRequest
;
67 req
.open("GET", 'resources/od_20000608.xml', false);
69 xml_dom_object
= req
.responseXML
;
72 nodeset
= xml_dom_object
.evaluate(EXPR
, xml_dom_object
, null, XPathResult
.UNORDERED_NODE_SNAPSHOT_TYPE
, null);
73 shouldBe('nodeset.snapshotLength', '0')
76 nodeset
= xml_dom_object
.evaluate(EXPR
, xml_dom_object
, null, XPathResult
.UNORDERED_NODE_SNAPSHOT_TYPE
, null);
77 shouldBe('nodeset.snapshotLength', '12')