简体   繁体   English

如何安装具有NGEN版本的二进制文件的IronPython 2.0?

[英]How do I install IronPython 2.0 with NGEN'ed binaries?

Does anyone know how to install IronPython 2.0 with NGEN'ed binaries using the MSI package? 有谁知道如何使用MSI软件包安装带有NGEN二进制文件的IronPython 2.0? The official IronPython homepage says that the NGEN option will greatly improve startup time, but for some reason it is not enabled by default. IronPython官方主页说NGEN选项将大大缩短启动时间,但是由于某种原因默认情况下未启用它。 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. 它实际上并没有说明您需要传递哪些MSI参数来启用它,而且我在该站点上找不到文档页面,所以希望这里的人会知道。 (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. 我之所以这样问是因为,在配备2 + ghz Intel Core 2 Duo w / 4gig的笔记本电脑上,一个简单的“ hello world”脚本的开始时间约为5-6秒。 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. 我希望这个NGEN选项可以解决此问题,因为它现在速度很慢,几乎感觉就像我在使用编译语言。

UPDATE : srivatsn had the right answer to use the NGENDLLS=True command line parameter. 更新 :srivatsn有使用NGENDLLS = True命令行参数的正确答案。

For future reference, here is the complete MSI command line I used to install IronPython 2.0 silently: 为了将来参考,这是我用来静默安装IronPython 2.0的完整MSI命令行:

msiexec /qn /i "IronPython.msi" NGENDLLS=True

Thanks Igal but I'm actually doing a silent install (via msiexec /qn) for centralized distribution to multiple machines. 感谢Igal,但我实际上是在进行静默安装(通过msiexec / qn)以集中分发到多台计算机。 Does anyone know what command line parameter (non UI) enables the NGEN option? 有谁知道哪个命令行参数(非UI)启用NGEN选项?

尝试从命令行传递NGENDLLS = True。

Update 1: If you are using scripts for mass distribution, Then you can probably just ngen from your script. 更新1:如果您正在使用脚本进行大量分发,那么您可能只能从脚本中获取ngen。 Also, the ironpython mailing list is very responsive, You can try to ask your question there. 另外, ironpython邮件列表响应速度非常 ,您可以尝试在此处提出问题。

Update 0: In the final release there is a check box that enables the ngen'ing of the ironpython assemblies. 更新0:在最终版本中,有一个复选框可以启用Ironpython程序集的ngening。 Just check it during installation. 只需在安装过程中检查即可。 Maybe you installed rc realese that, as far as I remember, didn't have this option. 就我所知,也许您安装的rc realese没有此选项。

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. 与直接问题无关,但是如果您要提高整体速度,还可以通过将其设为空来查看修改标准site.py。 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). 您还可以查看使用pyc.py示例来预编译所有标准模块(然后再编译该DLL的ngen)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM