Farfetch / rules-framework

A generic framework that allows defining and evaluating rules for complex business scenarios.
MIT License
41 stars 8 forks source link

Improve `MatchOneAsync` performance #98

Closed fernando-a-marins closed 1 year ago

fernando-a-marins commented 1 year ago

In the class Rules.Framework.RulesEngine.cs we should improve the performance when the method MatchOneAsync is called.

Currently, the MatchOneAsync is calling the method MatchManyAsync and only then the priority is selected.

We suggest here, for the MatchOneAsync evaluate the priority first and then "exit" when the first match occurs.

An investigation is recommended before starting developing.