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
CSharpScript.EvaluateAsync() growing memory usage #31751
Comments
This hit an app I'm working on pretty hard. We run long "analysis" operations and were trying to run hundreds at once when we ran into this. Our expressions are numeric-only and simple enough that we easily transitioned to Jace.NET to avoid this memory leak in Roslyn, but we've got another app in which expressions can have string parameters and operations, which will prevent usage of Jace.NET. I was about to create a new issue for this, so I'll add what I had already written: Version Used: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0. Also tried 3.5.0-beta3-final. Steps to Reproduce:
Expected Behavior: No increase in allocated objects/memory. Actual Behavior: Some increase in allocated objects/memory: |
Any update to share on this issue? |
Any update on this issue which is open since almost 3 years? |
Any update on this issue which is open since almost 5 years? |
The item is in the backlog. If you would like to contribute a fix, let us know. Thanks! |
Version Used:
2.10.0
Steps to Reproduce:
It's quite easy to reproduce, just run in Loop the following code:
string formula = "Math.Round((double)(15/(double)10*100),2)"; object result = await CSharpScript.EvaluateAsync(formula, o_scriptoptions);
Expected Behavior:
I was not expecting an ever-growing memory usage.
Actual Behavior:
The behaviour is well described by the following pictures from our memory profiler, showing live instances and bytes:
The issue might be related to the following:
#22219
#10164
The text was updated successfully, but these errors were encountered: