SOAPUI XmlSlurper memory leak?
Hi,
I have SOAPUI 5.0 installed. My SOAPUI groovy script reads a 18 MB xml file and retrieve xml elements using XMLSlurper. I am seeing the SOAPUI exe grows every time I run the script. It can grow from 30 MB to 100 MB or more... Anyone know what can cause the leak?
This is my script
import groovy.io.FileType
def list = []
def dir = new File("C:\\TEV\\results\\")
dir.eachFileRecurse (FileType.FILES) { file ->
if (file=~'.xml'){
f = file.toString().replaceAll("C:\\\\TEV\\\\results\\\\","")
list << f.toString().replaceAll(".xml","")
}
}
list.each{fund->
def xml = new File( "C:\\TEV\\results\\${fund}.xml" )
def root = new XmlSlurper().parse(xml)
// def root = new XmlParser().parse(xml)
root.holdingGroupList.holdingGroupByWeights.each{hg->
if (hg.holdingGroupName ==fund){
log.info ( "${fund} NOTIONAL: ${hg.portfolioValue}")
def bucket = hg.customBucketList.customBucket
bucket.each{b ->
if (b.customDimensionName == 'attribEffect')
log.info ( "${fund} TAG: ${b.customBucketValue}")
}
}
}
}