I was toying around with parser performance on a 10mb XML file I need to transform later on in large volumes; to select the best method of processing when I came across the following numbers. My destination was in each of the cases a nop sax handler :
SAX JDK 1.6 (Xerces fork) : 280 ms
SAX Fastinfoset parser : 29 ms
SAX Fastinfoset parser -> Saxon Identity Transform : 186ms
SAX Fastinfoset parser -> JDK 1.6 Transfomer (Xalan XSLTC fork) Identity Transform : 120ms
Don’t mind the numbers itself, although properly executed with the server jvm in a loop it was on a simple box and other stuff was running. It’s the relative difference that I’m interested in.
Quite happy by the fast infoset numbers, I was adding stuff to just build up my pipeline. But what took me by surprise was the overhead the identity transform added. I verified a possible bogus construct by trying out the JDK’s transformer instead of Saxon and although it performed better it still adds some significant time. My assumption was that a such a transformation takes very little effort as it’s a popular (if not the defacto) way to get from SAX to DOM or vice versa, but obviously I was wrong. Can anyone offer an insight on what might be the cause ?
With kind regards,
Product Delivery Manager
Phone: +32 3 821 01 70
Office Fax: +32 3 821 01 71
This message has been scanned for viruses and
dangerous content, and is believed to be clean.