On 27 Oct 2010, at 09:06, Andreas Truszkowski wrote: > Hello together,
Hi Andreas, > I have tried to profile my cdk taverna project with a profiling tool but > I failed. Hopefully you can give me a little hint of how to solve this > nasty memory leaks. I assume you are getting an OutOfMemoryError; can you post the stack trace you get? > But first let me explain how my workers work. > > Because I am working with CDK objects they are serialized as a byte > array so that they can be passed via the output port to another worker. > In the receiving workers the bytes are deserialized to CDK objects. Here > is a code snippet how the serialization and the port configuration is done: > > Configuring the output port: > T2Reference containerRef = referenceService.register(dataList, 1, > true, context); > outputs.put(this.RESULT_PORTS[0], containerRef); > the datalist is a list containing byte arrays (the serialized objects, > List<byte[]> dataList) > > Getting the data from the input port: > List<byte[]> dataList = (List<byte[]>) > referenceService.renderIdentifier(inputs.get(this.INPUT_PORTS[0]), > byte[].class, context); > the dataList is in the end deserialized to the CDK objects. > > Additionally I am using an looped workflow which is executed several > hundred times to iterate over a big sdfile library. > > Is there a need to deregister the registered objects > (referenceService.register(dataList, 1, true, context)) or does Taverna > itself discard them if they are not needed anymore? > Any hint what is running wrong is desired. Taverna should discard any references that it no longer requires. A few questions to try and narrow down the problem: Which version of Taverna are you using? Which operating system are you using? How are you running Taverna - from the command line, in Eclipse or some other testing framework? How are you storing the data - in memory or in a database? David. -- David Withers School of Computer Science, University of Manchester, Oxford Road, Manchester, M13 9PL, UK. +44 (0)161 275 0683 ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ taverna-hackers mailing list [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/about/contact-us/ Developers Guide: http://www.taverna.org.uk/developers/
