Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala XML performance vs. Java XML

I would appreciate if anyone could point me in the direction, or inform me of some benchmarks, which is comparing how Scala's XML library does compared to the typical solution in Java.

I'm thinking on measurements of parsing and selecting XML elements.

Thanks in advance.

Regards Stefan

like image 989
StefanE Avatar asked Oct 27 '11 12:10

StefanE


2 Answers

These benchmarks from the "Anti-XML" team are a good place to start, and other parts of the site highlight some of the problems with the current scala.xml approach.

like image 55
Travis Brown Avatar answered Nov 19 '22 06:11

Travis Brown


Scales Xml has performance roughly 20-30% slower than Xerces/JAXP deferred (the default setting but overall worse JAXP option for large xml) details and charts.

Interestingly Scales is 20-30% faster than JAXP for full parsing while having the low memory usage of JAXP deferred. In both cases you get a fully immutable document. Scales is also typically 30-40% faster than Scala parsing.

like image 35
Chris Avatar answered Nov 19 '22 04:11

Chris