Introduction:
I'm developing a web app (Grails) and have a XML operation (upload&import of >20MB file) that has a huge memory consumption causing OutOfMemoryExceptions in my productive environment.
So I want to compare XMLSlurper/XMLParser/XmlTwig in memory consumption (to be honest I'm too lazy to write a SAX parser for my DOM)
What I want to know:
I'm lacking a good idea how to start some batch executions in a non productive environment (plain groovy instead of grails environment). I want to test different implementations several times, measure memory consumption (and maybe cpu time) and displaying the average. It may also matter how the memory settings of my productive environment is set (-XX:MaxPermSize, ..., on Tomcat), it will be nice to change that also.
Has anyone an idea on how to do this?