[Catalyst] Alternatives to Catalyst ?

Matt S Trout mst at shadowcat.co.uk
Wed Apr 28 14:40:06 GMT 2010

On Tue, Apr 27, 2010 at 01:39:44PM +0400, Oleg Pronin wrote:
> Why can't nobody understand, the question is not why someone should
> use "$c->req->{params}". Of course that is an evil. Problem is that if
> i could get ->{parameters}{name} at a speed 100x there can't be no
> reason for ->params to work as a turtle and i see a good reason to use
> wrappers around Request to provide normal, fast method of acessing
> parameters. Use Class::XSAccessor, Fast::XS, i dont now, use
> something!!! Many people ask me why most of catalyst accessors working
> so slow ? i dunno what to answer except for writing our own wrapper
> accessors getting values directly with massive speedup.

You know, in the entire time I've been working on Catalyst apps (and bear
in mind Shadowcat have been a largely specialist Catalyst/DBIx::Class
consultancy for four years plus now) I have never, ever seen the speed
of methods on $c->req show up as a bottleneck.

I've never even seen them show up on pre-5.80 Catalyst where the accessors
were *slower* than they are now (which is why I find your comment about Moose
and hardware manufacturers to be ... unsupportable) - and as such I am unable
to understand why you're complaining now rather than back then.

Why can't -you- understand that the question is why you think a microbenchmark
of a method that should only be called a handful of times per request - and
has never, ever, shown up as a bottleneck for any of the developers on this
list - is remotely relevant and in any way a problem?

use strict;

is significantly slower than

BEGIN { $^H |= 0x602; }

but that doesn't count as an argument to use the second form instead unless
that import() call is genuinely a bottleneck in your application.

Premature optimisation is the root of much evil. Profiles of this being
a genuine problem for real production code or GTFO, please.

        Matt S Trout         Catalyst and DBIx::Class consultancy with a clue
     Technical Director      and a commit bit: http://shadowcat.co.uk/catalyst/
 Shadowcat Systems Limited
  mst (@) shadowcat.co.uk        http://shadowcat.co.uk/blog/matt-s-trout/

More information about the Catalyst mailing list