You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "E.S." <ra...@omega2.com> on 2000/11/19 23:10:45 UTC

Apache::Registry vs. Handlers

> on 11/19/00 6:04 PM, Randal L. Schwartz at merlyn@stonehenge.com uttered the
> following:
> 
> > When you're *really* good with mod_perl, you abandon Apache::Registry
> > and move up to writing handlers or using embedded templating systems
> > like EmbPerl, Mason, or Template Toolkit.
> 
Question...

All other things being equal, what's the general performance difference
between writing your own handlers or using a templating system vs. using
your scripts under Apache::Registry?  I've been running my old CGI scripts
under Apache::Registry for awhile now, and they seem to be pretty speedy;
what do I have to gain by doing it the "right" way?

Thanks..



Re: Apache::Registry vs. Handlers

Posted by Gunther Birznieks <gu...@extropia.com>.
At 10:42 PM 11/19/2000 -0800, spam@vancouver.yi.org wrote:
>[snip]
>
>Apache::Registry - use it only for backend or lowtraffic sites. It does
>not cache anything, so when you do databases, and files, can be bad to
>horrible to use. Using with small MySQL databases (50,000< records) you
>can get mediocre performance, cuz mysql connects require virtually no
>setup overhead. So if basically you have bunch of old code you have to
>throw up on the web and have no time this is the way to go.

What do you mean Apache::Registry caches nothing? You still get Apache::DBI 
and you can write your own package level caching mechanisms without too 
much problem.



Re: Apache::Registry vs. Handlers

Posted by Stas Bekman <st...@stason.org>.
On Mon, 20 Nov 2000, Gunther Birznieks wrote:

> Stas already ran benchmarks. Search the previous posts if he didn't include 
> them in the guide.

http://perl.apache.org/guide/performance.html#Apache_Registry_PerlHandler_vs_

> At 03:10 PM 11/19/2000 -0700, E.S. wrote:
> 
> > > on 11/19/00 6:04 PM, Randal L. Schwartz at merlyn@stonehenge.com 
> > uttered the
> > > following:
> > >
> > > > When you're *really* good with mod_perl, you abandon Apache::Registry
> > > > and move up to writing handlers or using embedded templating systems
> > > > like EmbPerl, Mason, or Template Toolkit.
> > >
> >Question...
> >
> >All other things being equal, what's the general performance difference
> >between writing your own handlers or using a templating system vs. using
> >your scripts under Apache::Registry?  I've been running my old CGI scripts
> >under Apache::Registry for awhile now, and they seem to be pretty speedy;
> >what do I have to gain by doing it the "right" way?
> >
> >Thanks..
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: modperl-unsubscribe@apache.org
> >For additional commands, e-mail: modperl-help@apache.org
> 
> __________________________________________________
> Gunther Birznieks (gunther.birznieks@extropia.com)
> eXtropia - The Web Technology Company
> http://www.extropia.com/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: modperl-unsubscribe@apache.org
> For additional commands, e-mail: modperl-help@apache.org
> 
> 



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org



Re: Apache::Registry vs. Handlers

Posted by Gunther Birznieks <gu...@extropia.com>.
Stas already ran benchmarks. Search the previous posts if he didn't include 
them in the guide.

At 03:10 PM 11/19/2000 -0700, E.S. wrote:

> > on 11/19/00 6:04 PM, Randal L. Schwartz at merlyn@stonehenge.com 
> uttered the
> > following:
> >
> > > When you're *really* good with mod_perl, you abandon Apache::Registry
> > > and move up to writing handlers or using embedded templating systems
> > > like EmbPerl, Mason, or Template Toolkit.
> >
>Question...
>
>All other things being equal, what's the general performance difference
>between writing your own handlers or using a templating system vs. using
>your scripts under Apache::Registry?  I've been running my old CGI scripts
>under Apache::Registry for awhile now, and they seem to be pretty speedy;
>what do I have to gain by doing it the "right" way?
>
>Thanks..
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: modperl-unsubscribe@apache.org
>For additional commands, e-mail: modperl-help@apache.org

__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
eXtropia - The Web Technology Company
http://www.extropia.com/


Re: Apache::Registry vs. Handlers

Posted by Robin Berjon <ro...@knowscape.com>.
At 15:10 19/11/2000 -0700, E.S. wrote:
>> on 11/19/00 6:04 PM, Randal L. Schwartz at merlyn@stonehenge.com uttered the
>> > When you're *really* good with mod_perl, you abandon Apache::Registry
>> > and move up to writing handlers or using embedded templating systems
>> > like EmbPerl, Mason, or Template Toolkit.
>> 
>Question...
>
>All other things being equal, what's the general performance difference
>between writing your own handlers or using a templating system vs. using
>your scripts under Apache::Registry?  I've been running my old CGI scripts
>under Apache::Registry for awhile now, and they seem to be pretty speedy;
>what do I have to gain by doing it the "right" way?

You ask a difficult -- if not impossible -- question. The performance of
templating systems depends on what features they have, and on what features
you use. Comparing them in terms of raw performance beyond the simple Hello
World is practically meaningless. One usually chooses a templating system
based on whether it supports feature x, y or z, and whether one likes the
syntax/model it uses.

As for CGI/Registry vs handlers, well.... I prefer handlers because what I
did in CGI lived mostly in modules anyway, and it fits the way I "do
things" better. If your CGIs are doing a lot of print()s, then I'd
definitely move to a templating system, perhaps in addition to modules
because it'll make your life easier and your code cleaner. Otherwise, if
you're happy with the way things work for you now, don't bother changing.
Just remember that there's more than the content handler if you need
functionality for other things related to your server, such as
authentication or logging.

-- robin b.
Machines take me by surprise with great frequency. -- Alan Turing


Re: Apache::Registry vs. Handlers

Posted by sp...@vancouver.yi.org.
On Sun, 19 Nov 2000, E.S. wrote:

> All other things being equal, what's the general performance difference
> between writing your own handlers or using a templating system vs. using
> your scripts under Apache::Registry?  I've been running my old CGI scripts
> under Apache::Registry for awhile now, and they seem to be pretty speedy;
> what do I have to gain by doing it the "right" way?

Depends on implementation, and benchmarks, benchmarks... and benchmarks.
Tightly coded modules would be the fastest, and do them in perl perhaps
slowly translating them into C if you really want the
performance. However, flexibility here is last item on the list.

Templating system - written a few and all different, some real fast,
nearly as fast as custom modules others about 2 - 5 time slower, because
they are so flexible.

Apache::Registry - use it only for backend or lowtraffic sites. It does
not cache anything, so when you do databases, and files, can be bad to
horrible to use. Using with small MySQL databases (50,000< records) you
can get mediocre performance, cuz mysql connects require virtually no
setup overhead. So if basically you have bunch of old code you have to
throw up on the web and have no time this is the way to go.

So there,
	Pavel
--
Bask in the glow of the digital silence.
http://www.vancouver.yi.org