Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Don't ask to ask, just ask
 
PerlMonks  

Script takes 4x more time to compile on Windows

by alain_desilets (Beadle)
on Dec 01, 2011 at 14:22 UTC ( #941078=perlquestion: print w/ replies, xml ) Need Help??
alain_desilets has asked for the wisdom of the Perl Monks concerning the following question:

I have a CGI script which, up to now, has been running on a Linux machine. The customer would like to move it to a Windows server.

We have done some preliminary tests, and find that while it takes 0.5 secs for the script to compile on the Linux box, it takes about 2 secs to compile on the Windows server. I was wondering if this was due to the difference of OS, or in difference of the power of the machine (the Linux box we are currently using is a pretty high powered workhorse, compared to the Windows server)?

Note that we have considered the possibility of using mod_perl to save that compilation time. But after reading this page:

http://perl.apache.org/docs/1.0/guide/porting.html

I'm scared shitless at the though of migrating this script that was written for a traditional CGI environment, to a mod_perl environment.

Any of you wizards have some thoughts or recommendations about this?

Thx

Comment on Script takes 4x more time to compile on Windows
Re: Script takes 4x more time to compile on Windows
by ww (Bishop) on Dec 01, 2011 at 14:34 UTC
    Clearly, the nature of the script could have some impact, and the OS is likely to be responsible for some small variance in compile speed, but it seems likely, at first glance, that the issue is the capabilities/resources of the processor in each box. You've hinted as much with your contrast between the two, where the Linus machine is
    "a pretty high powered workhorse, compared to the Windows server"

    Of course, it would help to know more specifics: what version of Linux and of Win server, what are the characteristics (processor, RAM, drive(s)) of each machine and which version of Perl is resident on each machine?

Re: Script takes 4x more time to compile on Windows
by TJPride (Pilgrim) on Dec 01, 2011 at 14:45 UTC
    With questions of this sort it's generally good to check the root assumption, which is that it's actually necessary to switch. What does the script do, how often does it run, and why is it necessary to switch from CGI to mod_perl? How much server resources (specifically, RAM) does it use when it's running? How long would it take to rewrite for mod_perl from scratch?
Re: Script takes 4x more time to compile on Windows
by chromatic (Archbishop) on Dec 01, 2011 at 19:17 UTC

    Instead of mod_perl, consider Plack and one of its backend servers. (Not all of them run well on Windows, but migrating something to Plack is easier than migrating it to mod_perl.)


    Improve your skills with Modern Perl: the free book.

Re: Script takes 4x more time to compile on Windows
by JavaFan (Canon) on Dec 01, 2011 at 22:05 UTC
    I was wondering if this was due to the difference of OS, or in difference of the power of the machine (the Linux box we are currently using is a pretty high powered workhorse, compared to the Windows server)?
    Nah, it seems unlike that if one machine is a pretty high powered workhorse compared to the other, that the difference can be explained by the power of the machine.

    It's probably smurfs. That's a much more logical explanation.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://941078]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-04-21 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls