Hi,
I am experiencing a weird situation using RowIterator to loop over tables which implement DataTable interface.
In KNIME 2.7.4, the code in [1] (which basically loops over a table trying to find and save the RowKey of specific rows) was designed and implemented. It worked reasonably well.
Currently, I have moved to KNIME 2.10.1 and the same code takes much more time (10 fold approx.).
I am trying to find out the reason inside my own code, but I am not able to find out what has changed. In addtiion the lines:
this.getSelectedIndividuals().add(dataRow.getKey());
this.updateTargetStats(targetValue);
basically update the content of java 'Set' objects.
I am aware that is very unlikely, but has anybody experienced low performance in loop operations (using the same loop structure) ? How could I find the root of the problem ?
Thanks in advance
Oscar
[1]
for (final DataRow dataRow : this.getDataTable()) {
final String targetValue = ((StringValue) dataRow
.getCell(targetColIdx)).getStringValue();
if (pInclude && (pFold == pFoldDistribution[idx])) {
this.getSelectedIndividuals().add(dataRow.getKey());
this.updateTargetStats(targetValue);
}
idx++;
}