You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Xinhuan Zheng <xz...@christianbook.com> on 2015/10/15 02:36:51 UTC

Needs some clarification

Dear mod_perl list,

I have been trying to look through the mod_perl documentation to figure out some mod_perl performance issues but I need some clarification on the following:


  1.  mod_perl as DSO vs statically compiled mod_perl with Apache httpd - other than large memory footprint of the statically compiled mod_perl, what would be other disadvantages of statically compiled mod_perl? If mod_perl is DSO, can it be shared by all Apache children processes? Does the sharing work the same for mod_perl 1 and mod_perl 2?
  2.  cgi-bin scripts vs mod_perl handler - Does cgi-bin scripts get compiled per request or just once? What about those mod_perl handler scripts? Is there difference between mod_perl 1 and mod_perl 2?

Thanks,
- xinhuan

Re: Needs some clarification

Posted by Xinhuan Zheng <xz...@christianbook.com>.
Thank you. Is there a way I can use t/TEST the Apache Test to see the cgi-bin scripts vs handler the difference?

Also, I noticed that in startup.pl, mod_perl documentation says do

use foo();

what’s the difference compared to using “use foo;”?

- xinhuan

From: James Smith <js...@sanger.ac.uk>>
Date: Friday, October 16, 2015 at 10:36 AM
To: Xinhuan Zheng <xz...@christianbook.com>>
Subject: Re: Needs some clarification



  1.  cgi-bin scripts vs mod_perl handler - Does cgi-bin scripts get compiled per request or just once? What about those mod_perl handler scripts? Is there difference between mod_perl 1 and mod_perl 2?

Traditional cgi-bin scripts are compiled each request.

mod_perl whether Registry scripts or handlers are compiled once per child and code pre-loaded before the child is forked will be compiled only once (you can force code to be compiled in the parent application!)

This is where you get performance gains over traditional CGI scripts.
Thanks,
- xinhuan


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.