We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After upgrading to the last version from 1.4.16.0 we are encountering performance issues on the EvaluateCast function.
The slowdown is caused by the use of the EvaluateType method instead of the GetTypeByFriendlyName.
Is this normal?
The text was updated successfully, but these errors were encountered:
I had similar issues and finally found out for my case. I hope this could be at least a hint for your case.
In my case, Assemblies loads many DLLs from my AppDomain (as my solution contains many DLLs)
So, I tried to remove all unnecessary DLLs being loaded.
var engine = new ExpressionEvaluator();
// load assemblies needed for script engine .Assemblies.Clear(); engine .Assemblies.Add(Assembly.Load("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")); engine .Assemblies.Add(Assembly.Load("MyDLL1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")); engine .Assemblies.Add(Assembly.Load("MyDLL2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")); // add namespaces engine .Namespaces.Add("MyLib.MyClass"); engine .Namespaces.Add("MyLib2.MyClass2"); // add types engine .Types.Add(typeof(MyLib.MyClass)); engine .Types.Add(typeof(MyLib2.MyClass2)); // then call evaluator
var result = eingine.ScriptEvaluate(engine.RemoveComments(expression));
after doing this, > 500ms total time reduced to 31ms
Hope this helps!
Sorry, something went wrong.
No branches or pull requests
After upgrading to the last version from 1.4.16.0 we are encountering performance issues on the EvaluateCast function.
The slowdown is caused by the use of the EvaluateType method instead of the GetTypeByFriendlyName.
Is this normal?
The text was updated successfully, but these errors were encountered: