Posts

Showing posts with the label XML

Cargo-itest extended

I have been doing some work on the cargo-itest project and extended it with the following features: - JOnas support - Jetty support - Auto detection of configuration files for JBoss - Extended logging information to be able to detect problems in an easier way These changes will be in the next release 1.2.0. The auto detection is a nice one since it automatically picks up .properties files and -ds.xml (Data source files) from a preconfigured location so you don't have to copy them selves to the correct location. :-) In the future we will try to implement configuration by annotation since some users prefer doing configuration through annotation instead of an XML file. In this case a Spring context file.

Fastest XML parser

In most applications you need to do some XML parsing to either provide XML to external systems or parse XML from external systems or of course both. Since the systems I work on use a lot of XML and they need to be as fast as possible I did some tests on several XML parsers. I tested the following parsers/XML frameworks: JDom Piccolo StaxMate XStream JAXB 2.1 All parsers were tested in isolation with the following parameters: 25 threads running simultaniously Every thread calls the parser 100 times The results are as follows. JDom Avg. parsing time: 325.24 ms Avg. memory usage: 307 KB Piccolo Avg. parsing time: 88.08 ms Avg. memory usage: 454 KB StaxMate Avg. parsing time: 96.16 ms Avg. memory usage: 203 KB XStream Avg. parsing time: 77.04 ms Avg. memory usage: 319 KB Jaxb 2.1 Avg. parsing time: 1778.12 ms Avg. memory usage: 618 KB As you can see XStream is the fastest one of them all. The total ranking of the parsers you can find below: XStream Piccolo StaxMate JDom JAXB 2.1 ...