• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microsoft / RulesEngine / 26519369129 / 1
95%
master: 97%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 27 May 2026 03:02PM UTC
Files 24
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 May 2026 02:59PM UTC coverage: 95.573% (+0.5%) from 95.095%
26519369129.1

push

github

web-flow
Restore compiled-expression cache in RuleExpressionParser (fixes #673) (#727)

The static MemCache around Compile<T> was removed in v5.0.1 (#501) along
with the AutoRegisterInputType feature. Removing it caused every call to
Compile<T> / CompileRuleExpressionParameters to re-run the dynamic
expression parser and re-emit IL, causing ~10x slowdowns reported in #673
and 100x-1900x slowdowns on the public parser and ExecuteActionWorkflowAsync
paths that are not served by the workflow-level RulesCache.

Reintroduce the cache as an instance field (not static, to avoid the latent
cross-settings sharing bug the old static had). The key includes the
expression text, ordered (paramName, paramType), return type, and a settings
fingerprint covering IsExpressionCaseSensitive, UseFastExpressionCompiler,
and CustomTypes. Scoped-params keys also include each value-expression's
text so workflow mutations correctly invalidate.

Honors the existing ReSettings.CacheConfig; SizeLimit == 0 disables.

Benchmark (median of 5 runs, .NET 8, 30-rule workflow):
  Parser.Evaluate<bool> x 30k:           34,730 ms -> 33 ms   (~1052x)
  Parser.Compile<bool>  x 30k:           34,846 ms -> 18 ms   (~1936x)
  ExecuteActionWorkflowAsync x 1000:      1,182 ms ->  3 ms   ( ~394x)
  ExecuteAllRulesAsync x 1000 (warm):        11 ms -> 17 ms   (within noise)
  Fresh engine x 50:                      1,890 ms -> 1,867 ms (unchanged)

Co-authored-by: Yogesh Prajapati <yogeshcprajapati@outlook.com>

391 of 488 branches covered (80.12%)

734 of 768 relevant lines covered (95.57%)

530.11 hits per line

Source Files on job 26519369129.1
  • Tree
  • List 24
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 26519369129
  • 6e62a1b8 on github
  • Prev Job for on main (#26503523544.1)
  • Next Job for on main (#26522805549.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc