in reply to Speeding up Perl Scripts on Windows
As has been alluded to by others, the problem with CGI on Windows has always been the process startup overhead, this is why the in-process techniques (such as ASP or ISAPI) have generally been preferred on that platform. PerlEX is not going to win you much in this environment, it might run faster and it might save you a bit of time in the compilation phase, but you are still creating a new windows process to handle the CGI.
The Activeperl installation will already have installed and configured the ISAPI Perl extension for you (unless you unchecked the default in the installer), so in principle you could just rename your CGI programs to have the .plx suffix and you could be away. That said however you will almost certainly need to take care with your code so that it works properly in the persistent environment (in much the same way as you would have to with a program running within mod_perl.) E.g. reduce the scope of all variables as much as possible, properly close all filehandles and avoid explicitly exiting the program among others.
I should probably mention Perlscript for ASP as well - ASP was really intended to replace ISAPI and is probably more efficient (though I have no data to back this up), the drawback is that you will have to rewrite most of your application to become Active Server Pages and quite honestly as, IMO, with all such embedded scripting environments (PHP, JSP and the handful of Perl equivalents) it can get messy really quickly if you don't apply strong software design principles from the outset.
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Speeding up Perl Scripts on Windows
by perrin (Chancellor) on Apr 21, 2005 at 13:52 UTC |