Monday, July 19, 2010

MFL+JAXB versus pure Java parsing

Disclaimer:   this test was done in Eclipse using WLXT. The test proves to be INCREDIBLY slower compared to running the same MFL transformation inside OSB. In fact, inside OSB reading 418 binary files (5 KB each) and writing them in XML format took roughly 8 seconds - a LOT better than the 155 seconds using WLST.
I am curious now to understand where lies the HUGE difference in performance of the Format Builder libraries when run in OSB and in Eclipse.

Morale: don't benchmark MFL using a out of container test.

I have 417 files containing "binary" messages, fixed length fields, to be parsed into Java objects. Each file is some 5 KB each. Total some 2 MB.

Doing the transformation:
Binary -> XML (with MFL) followed by
XML -> Java (with JAXB)

inside Eclipse takes a whopping 157 seconds, out of which 101 in MFL and 56 in JAXB.
The same transformation run on a OSB proxy service takes some 5 seconds (!!!).

Doing the transformation Binary -> Java directly in Java takes 3.5 seconds - that is some 50 times faster. I assume the memory garbage produced would be also immensely lower by parsing directly in Java.

The Java parser took 4 hours to build and test. MFL took 2 hours to make and 2 hours to troubleshoot.

No comments: