Hi,
I designed a component that collects some information from passed records, then enter into a complex algorithm that eventually generates new data records. One issue with this, is that you have to collect new nodes during the whole process, then release them at the component onProcess level (see below, although I assume that everyone knows).
The main issue with this process is when many thousands of nodes are to be collected, you rapidly get a "Java Heap Space" error message.
...
data.setRoot(node);
data.routeTo(Route.PassPort);
if (nodeIterator.hasNext()) {
return Component.State.ReadyForNewData;
}
else {
return Component.State.DoneProcessingData;
}
}
else {
// algorithm here: create nodes and add to the node collection
nodeIterator = nodeCollection.iterator();
if (nodeIterator.hasNext()) {
return Component.State.ReadyNewData;
}
else {
return Component.State.DoneProcessingData;
}
}
}
