views:

389

answers:

4

Does anyone know how to install IronPython 2.0 with NGEN'ed binaries using the MSI package? The official IronPython homepage says that the NGEN option will greatly improve startup time, but for some reason it is not enabled by default. It doesn't actually state which MSI parameters you need pass to enable it, and I couldn't find a documentation page on the site, so I'm hoping someone here would know. (Clarification: I'm doing a silent install for distribution to multiple machines, so I'm looking for command line parameters, thanks)

I'm asking this because the start time for a simple "hello world" script is in the order of 5-6 seconds on my laptop with 2+ghz Intel Core 2 Duo w/ 4gig. And this happens every time I run. I hope that this NGEN option solves this problem because as slow as it is now, it almost feels like I'm using a compiled language.

UPDATE: srivatsn had the right answer to use the NGENDLLS=True command line parameter.

For future reference, here is the complete MSI command line I used to install IronPython 2.0 silently:

msiexec /qn /i "IronPython.msi" NGENDLLS=True
+1  A: 

Update 1: If you are using scripts for mass distribution, Then you can probably just ngen from your script. Also, the ironpython mailing list is very responsive, You can try to ask your question there.

Update 0: In the final release there is a check box that enables the ngen'ing of the ironpython assemblies. Just check it during installation. Maybe you installed rc realese that, as far as I remember, didn't have this option.

Igal Serban
A: 

Thanks Igal but I'm actually doing a silent install (via msiexec /qn) for centralized distribution to multiple machines. Does anyone know what command line parameter (non UI) enables the NGEN option?

DSO
+5  A: 

Try passing in NGENDLLS=True from the commandline.

srivatsn
awesome, thanks srivatsn... that did the trick. now the print "hello world" app consistently takes around 2 seconds on my machine... still not stellar but a vast improvement.another amazing thing... when I google for "ironpython silent install", this post is the first hit!
DSO
+1  A: 

Unrelated to the direct question but if you're looking for general speed ups you can also look at modifying the standard site.py by making it empty. You could also look at using the pyc.py sample to pre-compile all of the standard modules (and then ngen that DLL as well).

Dino Viehland