zzzprojects / Eval-Expression.NET

C# Eval Expression | Evaluate, Compile, and Execute C# code and expression at runtime.
https://eval-expression.net/
Other
449 stars 86 forks source link

Threading Question #130

Closed stonstad closed 2 years ago

stonstad commented 2 years ago

If I use Eval.Execute in a highly threaded scenario, is there internal blocking? I notice that as I ramp up threads throughput remains about the same. Would I see better performance if I create a context for each thread?

stonstad commented 2 years ago

Just returning to this issue. It may be related to the code being CPU bound. https://github.com/zzzprojects/Eval-Expression.NET/issues/129 is causing cache misses for each expression evaluated (despite same expression text), which in turn requires compilation and higher than anticipated CPU utilization.

JonathanMagnan commented 2 years ago

Hello @stonstad ,

You should not have any performance improvement if you create a context for each thread.

Indeed, let's check first with issue #129 and see if this one still happens after.

Best Regards,

Jon

JonathanMagnan commented 2 years ago

Hello @stonstad ,

Let me know if you still have the issue after applying the same fix as the one in the Issue #129

Best Regards,

Jon

stonstad commented 2 years ago

No issues on this one. Please feel free to close. Thank you!