Home | History | Annotate | Download | only in Borrowed
      1 <!-- 
      2 4XPath Performance test from "Olivier Deckmyn" <odeckmyn.list (a] teaser.fr>, with import and filename updates
      3 
      4 Subject: [4suite] 4XPath performance ?
      5 Date: Thu, 8 Jun 2000 16:30:21 +0200
      6 From: "Olivier Deckmyn" <odeckmyn.list (a] teaser.fr>
      7 To: "4Suite list" <4suite (a] dollar.fourthought.com>
      8 
      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.
     13 
     14 There is a lot of memory, cpu is not used for anything else than the test...
     15 
     16 With a 100KB xml file, I have applied the attached test1.py
     17 
     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
     28 
     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>
     47 
     48 
     49 Result :
     50 Indexing is worth the price ! Very quick index build, and 3.5x speed gain
     51 ...
     52 But, it very slow anyway :(
     53 
     54 Is this the "normal" performance ? Can I do better?
     55 -->
     56 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
     57 <html>
     58 <head>
     59 <link rel="stylesheet" href="../../../js/resources/js-test-style.css">
     60 <script src="../../../js/resources/js-test-pre.js"></script>
     61 </head>
     62 <body>
     63 <div id="console"></div>
     64 
     65 <script>
     66 
     67     req = new XMLHttpRequest;
     68     req.open("GET", 'resources/od_20000608.xml', false);
     69     req.send(null);
     70     xml_dom_object = req.responseXML;
     71 
     72     EXPR = '//author'
     73     nodeset = xml_dom_object.evaluate(EXPR, xml_dom_object, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
     74     shouldBe('nodeset.snapshotLength', '0')
     75 
     76     EXPR = '//date'
     77     nodeset = xml_dom_object.evaluate(EXPR, xml_dom_object, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
     78     shouldBe('nodeset.snapshotLength', '12')
     79 
     80     var successfullyParsed = true;
     81 
     82 </script>
     83 <script src="../../../js/resources/js-test-post.js"></script>
     84 </body>
     85 </html>
     86