Andreas Andreakis wrote:
A possible solution to prevent Facts dublication would be to save Facts in a HashSet. Drawback: you need to specify hashcodesThis will probably work, but is no longer declarative, rule-based programming. If you do not care about this semi-philosophical argument, stop reading here... The correct way to solve the problem in my opinion is to add an extra rule that removes duplicates (in Drools you should probably give it a higher salience...). So you simply add away, and declare that duplicates have to be removed. The responsibility of using a hash-set (or any other efficient data-structure) to efficiently look up duplicate facts should lie with the rule-engine, not with the user. As always, I do not know the details of the internals of Drools, so your solution might in fact be faster, but it remains a hack in my opinion... Greets, Pé |
- [drools-user] Performance problems on Transitivity Infer... Andreas Andreakis
- Re: [drools-user] Performance problems on Transitiv... Peter Van Weert
- Re: [drools-user] Performance problems on Trans... Andreas Andreakis
- Re: [drools-user] Performance problems on T... Mark Proctor
- Re: [drools-user] Performance problems ... Andreas Andreakis
- Re: [drools-user] Performance problems on T... Michael Neale
- Re: [drools-user] Performance problems ... Peter Van Weert
- Re: [drools-user] Performance prob... Michael Neale
- Re: [drools-user] Performance ... Peter Van Weert
- Re: [drools-user] Performance problems ... Andreas Andreakis
- Re: [drools-user] Performance prob... Peter Van Weert
- Re: [drools-user] Performance ... Andreas Andreakis
- Re: [drools-user] Performa... Bob McWhirter
- Re: [drools-user] Performa... Peter Van Weert
- Re: [drools-user] Performa... Michael Neale
