Is there a way to increse startup script exceuction for python?

First I did “pip install arrow” on any existing iron python installation. (it is just sample lib for testing purpose) add them to script engine.
scriptRun.ScriptSource.ModulesSearchPaths.Add(“C:\IronPython 2.7\Lib”);
scriptRun.ScriptSource.ModulesSearchPaths.Add(“C:\IronPython 2.7\Lib\site-packages”);

then do script compile and run the run function.
for code like:
import arrow
def run ():
ff = open(“smth.txt”, “a”)
ff.write(str(arrow.utcnow())+ ‘\n’);
ff.close();

It takes very long time to run function for first time. Doing any change to script or just setting flag (ScriptSource.Changed = true;) will cause long compile time again. Is there any possible way to reuse previous part compilation, that startup time would be faster.

I guess it is because of “Jitting”. Every time it starts from scratch jitting everythin even for library that was not changed? Maybe it would be possible to cache resutls? save to dll or smth?

Hi Audrius,

We looked at the problem and indeed it seems to be caused by generating assembly and and running JIT to produce machine code:

This seems to be how IronPython works and I’m not sure we can improve much here.

For your information, we’re going to support running/debugging full Python in the next release:

Kind regards,
Dmitry