You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kelly White <mc...@yahoo.com> on 2000/08/03 00:41:44 UTC

Mason vs. Apache::Registry

I am considering using either HTML::Mason or Apache::Registry for my CGI
scripts, but am not sure which is faster.  Would the template/pages be cached
like the scripts are in Registry?  Which would be faster?  Obviously using
Mason would make cleaner code, but it wouldn't get compiled, would it?  Any
help you can give is appreciated.  Thanks,

mckhendry


__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/

Re: Mason vs. Apache::Registry

Posted by Joshua Chamas <jo...@chamas.com>.
Kelly White wrote:
> 
> I am considering using either HTML::Mason or Apache::Registry for my CGI
> scripts, but am not sure which is faster.  Would the template/pages be cached
> like the scripts are in Registry?  Which would be faster?  Obviously using
> Mason would make cleaner code, but it wouldn't get compiled, would it?  Any
> help you can give is appreciated.  Thanks,
> 

Like Ken said, its a feature vs. speed tradeoff:
Here's some numbers for you, on the same box, which is
the best way to compare:

   http://www.chamas.com/bench/hello_bysystem.html#group20

-- Joshua
_________________________________________________________________
Joshua Chamas			        Chamas Enterprises Inc.
NodeWorks >> free web link monitoring	Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Re: Mason vs. Apache::Registry

Posted by Ken Williams <ke...@forum.swarthmore.edu>.
mckhendry@yahoo.com (Kelly White) wrote:
>I am considering using either HTML::Mason or Apache::Registry for my CGI
>scripts, but am not sure which is faster.  Would the template/pages be cached
>like the scripts are in Registry?  Which would be faster?  Obviously using
>Mason would make cleaner code, but it wouldn't get compiled, would it?  Any
>help you can give is appreciated.  Thanks,

Under Mason:

  * Yes, the templates (components) are cached, both on disk and in memory.
  * Yes, components are pre-compiled into Perl subroutines.
  * In addition, there's a fairly comprehensive cache control system that
    lets you control caching of certain parts of the output based on
    whatever parameters you need.

Mason can still be slower than Registry, but that's because Mason does
more for you.  It's a whole framework.  It can also be faster than
Registry if you take advantage of its advanced caching stuff (and if it
would have been too much hassle to do something similar under Registry).
Just like Perl can often be faster than C because writing the equivalent
C can be too much hassle.