[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RegExp versus SAX-Parsing
Hi xmlBlaster's,
i have made comparison between GNU Regular Expressions for Java (1.08)
and
SAX-Parsing (SUN). You can test this. See in our testsuite:
  testsuite/org/xmlBlaster/query/REvParsing.java
Invoke this test:
  java testsuite.org.xmlBlaster.query.REvParsing  -f /PATH/$file.xml
In this test, i search OID's of the xmlkey.
I have testet on a PII 350 which JDK1.3 for Linux. Look at my
results.....
RegExp versus SAX-Parsing.
---------------------------------------------------------------------------------------------
Step  Number Of Keys  File-Size        RegExp                 SAX                   Result
---------------------------------------------------------------------------------------------
1.     1              385   Byte       [ 146 millis ]         [ 298 millis ]        useful
2.     10             1974  Byte       [ 181 millis ]         [ 311 millis ]        useful
3.     100            17880 Byte       [ 285 millis ]         [ 385 millis ]        useful
4.     175            33623 Byte       [ 345 millis ]         [ 387 millis ]        ------
5.     250            45630 Byte       [ 473 millis ]         [ 384 millis ]        SAX
6.     500            89400 Byte       [ 618 millis ]         [ 384 millis ]        SAX
7.     1000           178800  Byte     [ 811 millis ]         [ 393 millis ]        SAX
8.     10000          1788000 Byte     [ 4 sec 248 millis ]   [ 721 millis ]        SAX
9.     500000         8940000 Byte     [ 18 sec 704 millis ]  [ 1 sec 651 millis ]  SAX
---------------------------------------------------------------------------------------------
Summary:
If you have XmlKeys or other xml-stuff which contains max. 175 hits of
your Search-/Filtering,
GNU RegExp for Java is more useful than SAX-Parsing. If you have much
more hits in your
document, it makes not doubt, SAX-Parsing is faster than RegExp.
OK, that enough for today.
Cheers from Manuel
--
 --------------------------------------------------------------------
| Manuel Kron,                    |   http://www.xmlBlaster.org      |
| Dipl.-Ing. Softwaretechnik (FH) |   Mail:    manuel.kron at gmx.net   |
| Gartenstr. 11                   |   Privat:  07531 / 282 770       |
| D-78462 Konstanz                |   Handy:   0174  / 44 21 491     |
 --------------------------------------------------------------------