Howdy,
I'm trying to extend one of my WebApps using IronPython, unfortunately the code below runs pretty slowly:
var engine = Python.CreateEngine();
SourceCodeKind st = SourceCodeKind.Statements;
string source = "print 'Hello World'";
var script = engine.CreateScriptSourceFromString(source, st);
var scope = engine.CreateScope();
script.Execute(scope);
I'm assuming that the creation of the Python Engine is taking most of the time, as even an interpreted language such as Python should run relatively fast.
So, assuming my assumptions are correct; can I store the Python Engine somewhere to save the expense of having to create it every time? Or is there a better way to do this?
Anthony