XMLBuilder very cpu intensive?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

XMLBuilder very cpu intensive?

rlovtangen
I created an XML, typically ~40kb, using XMLBuilder in my controller:

render(contentType:"text/xml"){
    groups {
        groupsMap.each {String name, val ->
....

Depending on cpu available this can take up to 2 minutes (!), usually around 20 seconds, but sometimes as fast as 1 second.

I rewrote to using plain text concatenation with StringBuilder. Now the same XML takes only about 200 to 600 milliseconds to generate.

Is this just how it is with XMLBuilder, given all the method missing interception it has to do?

My computer is a MacBook Pro, 2.4GHz Intel Core 2 Duo.


Ronny



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email