Buschfunk
16 years agoFrequent Contributor
Optimizing Groovy code for XML operations
Hello,
I'm using a Groovy script test step as a little helper script to create XML files. Basically, this script loads an XML file as a template and clones a specific node n-times. This is working fine from the functional point of view. When it comes to peformance however, e.g. when cloning this node 1.000 times, my script is kind of slow and consumes almost the complete heap memory.
It seems as if I would handle all the XML operations (nostly using classes XmlHolder and XmlParser) in the memory. Is there a more efficient way of performing such operations? I'll be happy posting the code if necessary.
Thanks,
Robert
I'm using a Groovy script test step as a little helper script to create XML files. Basically, this script loads an XML file as a template and clones a specific node n-times. This is working fine from the functional point of view. When it comes to peformance however, e.g. when cloning this node 1.000 times, my script is kind of slow and consumes almost the complete heap memory.
It seems as if I would handle all the XML operations (nostly using classes XmlHolder and XmlParser) in the memory. Is there a more efficient way of performing such operations? I'll be happy posting the code if necessary.
Thanks,
Robert