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\


In reply to Re: Speeding up Perl Scripts on Windows by gellyfish
in thread Speeding up Perl Scripts on Windows by tanger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.