Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid recompiling rules on every call #242

Closed
wants to merge 3 commits into from

Conversation

aok-foss
Copy link
Contributor

Currently the rule code is compiled on every execution. Apart from performance impact of the compilation, this results in process private bytes growing on every execution as the dynamically compiled assemblies are never unloaded. After a number of executions, they start failing with an OutOfMemoryException.

This change does not fix the memory leak but it does make sure the rules are not recompiled unless they changed, so the leaking rate does not depend on number of rule executions.

@giuliov
Copy link
Member

giuliov commented Aug 23, 2021

Thank you! I started working on this PR in the weekend but I need a little more time to add some tests.

giuliov added a commit that referenced this pull request Aug 27, 2021
giuliov added a commit that referenced this pull request Sep 4, 2021
* Avoid recompiling the same rule on every call

* Update ScriptedRuleWrapper.cs

fix compilation error

* Fix IdentyRef parsing

* Support "only links" filter option when adding a mapping

* Added tests to #242

* changelog

* dependencies updated

* release log

Co-authored-by: Alexander Omelchuk <AOK@foss.dk>
Co-authored-by: aok-foss <50981666+aok-foss@users.noreply.github.com>
@giuliov
Copy link
Member

giuliov commented Mar 19, 2022

Included in release v1.2.

@giuliov giuliov closed this Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants