tags:

views:

59

answers:

2

We're starting to investigate a project that requires a tricky bit of XML parsing.

I like the look of Groovy's XmlSlurper (Groovy appears to be my Golden Hammer of choice at the moment). We'll need to process a pretty wide range of XML inputs and Groovy's dynamic nature might just let us work out a neat, concise solution. We'll see.

A concern might be the cost of that flexibility and dynamism in terms of speed, though I've done no testing of that yet. Does anyone have any experience with this? Are Groovy and XmlSlurper particularly fast or slow compared to some of the Java alternatives for parsing XML?

Thanks,

Martin.

A: 

In my experience, the speed with which you can get something up and running in Groovy far outweighs any slowdown caused by its dynamic nature...

And in the rare instances it is severely impacting your application, you can always drop out the Groovy code, and write a Java class which adheres to the same Interface, and should plug straight in...

Hmmm...not really an answer this. I guess you could see it more as words of encouragement from the touch line ;-)

tim_yates
Bit of a vague question too! Thanks. I have the same feeling about getting something out quickly, so good to hear the encouragement.
Martin Dow
A: 

I did not see serious performance problems with XmlSlurper but you should use it carefully:

Csaba_H