我如何编译我的Perl脚本,以减少启动时间? [英] How can I compile my Perl script so to reduce startup time?

查看:178
本文介绍了我如何编译我的Perl脚本,以减少启动时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法保存我的perl脚本的编译版本?

Is there a way to save a compiled version of my perl scripts?

或者一种方式来做一个JavaScript风格的编译,你只需删除注释,空格等?

Or a way to do a JavaScript style compile where you just remove comments, whitespace, etc?

推荐答案

您尝试在错误的地方进行优化。如果您在web / cgi环境中运行脚本,则不需要在每次执行脚本时都进行编译命中。脚本应该持久运行,您可以使用Apache mod / perl,FastCGI或一些较新的技术和框架,如Plack和Catalyst。如果您更具体地了解您的需求,您会发现您可以选择多种选择。

You're trying to optimize in the wrong place. If you are running scripts in a web/cgi environment, there is no need to take a compile hit every time the script is executed. The scripts should be running persistently, which you can do with Apache mod/perl, FastCGI, or a number of newer technologies and frameworks such as Plack and Catalyst. If you are more specific about your needs, you will discover that there are a number of options available to you.

这篇关于我如何编译我的Perl脚本,以减少启动时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆