Perrin Harkins wrote:
I recently gave some advice on perlmonks.org to a person who was
concerned about what his migration path would be if he develops for
mod_perl 1 right now.  I told him he will be safe if he uses
Apache::Registry, since he should be able to run his A::R scripts under
ModPerl::Registry unchanged (assuming he does the workaround for chdir
and uses prefork).

Another person suggested coding to the mp 1 handler API and using
Apache::compat to port.  I thought that would be slow and potentially
bad in terms of memory used, but I'm not actually certain how these two
options compare.  Does anyone have any information about the comparison
of ModPerl::Registry and Apache::compat in terms of performance, memory,
and ease of porting?  I'd like to make sure I give good advice on this
topic.

Apache::compat's usage should be avoided in production if possible at the moment, other than during initial porting. So if that's the case, the issues of performance and memory moot ;) If not, please read on.


The biggest problem with Apache::compat is that it modifies the behavior of several methods to behave like they did in mp1. So if you run on the same server some code that relies on their mp2 behavior, there is a conlict.

Besides that memory-wise it'll just load all the modules that it needs, so you might get some unneeded modules loaded, which shouldn't be much of a problem.

Performance-wise, some to the previously implemented in C methods, are now implemented in Perl, so the speed will be affected. This is only true for methods which no longer exist in Apache 2.0 C API. So one will have to check what methods they are using in order to judge the performance impact.

Personally, I'm now using the new module Apache::porting, which assists in moving to the mp2 API, not providing a back-compat with mp1 API.
http://perl.apache.org/docs/2.0/api/Apache/porting.html


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to