microsoft / RulesEngine

A Json based Rules Engine with extensive Dynamic expression support
https://microsoft.github.io/RulesEngine/
MIT License
3.47k stars 530 forks source link

Workflow Evaluation is very slow #513

Open MithunChopda opened 10 months ago

MithunChopda commented 10 months ago

Hi Team,

I am evaluating this RulesEngine for a solution that requires evaluating rules for data filtering. I have a workflow with 13 rules. If any of the Rules evaluates to True, I want to include the record for display. When executing this workflow with 13 rules for 600 records, the whole execution takes 13 seconds. This is very very slow and I am trying to understand what could be causing this slowness? Is it because all 13 rules are being evaluated or will the Rules Evaluation be short circuited the moment any of the rule evaluates to true and skip evaluating other rules?

abbasc52 commented 10 months ago

Hi @MithunChopda can you please share sample code to reproduce this issue?

cristiangce commented 10 months ago

Hola, yo tengo un problema similar de lentitud pero en un escenario diferente. Tengo un flujo con un número X de reglas que se demora 6s en ejecutar 72 registros, si a una de estas reglas le agrego subreglas el tiempo casi no se ve afectado pero si las mismas subreglas las creo como parte de una nueva regla, el tiempo aumenta y ahora ya demora 8segundos.. hay alguna explicación para esto?