Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / 4XPath / Borrowed / od_20000608.html
blob938caae7323e4ed62585e510eb6f7be305f50c15
1 <!--
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)
20 Reading document
21 took 1.336457 sec
22 Starting query
23 took 307.572385 sec
24 Indexing DOM
25 took 0.125362 sec
26 Starting query
27 took 84.692544 sec
29 QUERY="//date" (few matches in the file)
30 Reading document
31 took 1.341848 sec
32 Starting query
33 took 308.466919 sec
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
39 took 0.128668 sec
40 Starting query
41 took 85.145023 sec
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>
49 Result :
50 Indexing is worth the price ! Very quick index build, and 3.5x speed gain
51 ...
52 But, it very slow anyway :(
54 Is this the "normal" performance ? Can I do better?
55 -->
56 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
57 <html>
58 <head>
59 <script src="../../../../resources/js-test.js"></script>
60 </head>
61 <body>
62 <div id="console"></div>
64 <script>
66 req = new XMLHttpRequest;
67 req.open("GET", 'resources/od_20000608.xml', false);
68 req.send(null);
69 xml_dom_object = req.responseXML;
71 EXPR = '//author'
72 nodeset = xml_dom_object.evaluate(EXPR, xml_dom_object, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
73 shouldBe('nodeset.snapshotLength', '0')
75 EXPR = '//date'
76 nodeset = xml_dom_object.evaluate(EXPR, xml_dom_object, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
77 shouldBe('nodeset.snapshotLength', '12')
79 </script>
80 </body>
81 </html>