hi,
I use drools 2.1 and jsr 94.
why need this 40times longer
for (Iterator iter = list.iterator(); iter.hasNext();) {
Object element = (Object) iter.next();
try {
statefulRuleSession.addObject(element);
} catch (InvalidRuleSessionException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
}
statefulRuleSession.executeRules();//<--execute after every 'Iterator'
than this?
for (Iterator iter = list.iterator(); iter.hasNext();) {
Object element = (Object) iter.next();
try {
statefulRuleSession.addObject(element);
statefulRuleSession.executeRules(); //<--execute after every 'addObject'
} catch (InvalidRuleSessionException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
}
think about 10000 added objects.