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
ScriptRunner.Execute performance? #338
Comments
Hi Mikael. We are aware of the performance issue and there is actually several things we can do to improve on this. For instance, for every run we do a package restore behind the scenes to bring in the script dependencies. This is done in a separate process (we basically just wrap Note that we also have an option to "publish" your script that basically turns you script into an executable
|
There is a possibility to "cache" a script for subsequent quick runs but it is only available in the executable, not in the library layer. It's described here https://github.com/filipw/dotnet-script/releases/tag/0.26.0 However, I think it could be moved to the library so that it would kick in when invoking the script programmatically. |
see PR #339 , this should give some improvements. |
This PR was accepted, the essence is that the DLLs produced by executing a script are automatically cached if the source script has not changed. |
Closed by #383 |
Thanks for the interesting project! We're currently seeing some performance issues with dotnet script and I wonder if we're missing some obvious setting / configuration. Our test script is:
return "hello world";
And the problem is that it takes ScriptRunner.Execute little more than 1 second to execute this, even if we execute the same script multiple times using the same ScriptRunner instance. The performance doesn't change from first execution to second or third execution. It feels like we're missing some "cache" toggle.
This is how we are initializing things:
Any ideas how we could make things faster? It's OK if ScriptRunner.Execute takes second or so for the first time but we would like things to be much quicker when we run the same script the second time.
The text was updated successfully, but these errors were encountered: