[Catalyst] Maybe there is a need for some speedups of 'config' method ?

Oleg Pronin syber.rus at gmail.com
Sun Feb 22 17:41:40 GMT 2009


1% here and 1% there. You won't detect any place that takes longer. All of
load is 1%+1%+....
Don't you agree ? Plus a number of plugins calls ->config on startup which
slow downs startup as well)

P.S.
  I use many actions that take params from config in runtime, for example
  sub pay_for_vip : Private {
       ...
       my $price =3D $c->cfg->{vip}{price};
  }

And in my deepest opinion we should now spend CPU time anywhere even if it
is not a concern.

Thanks anyway)

This is convenient + good HUP support for deamon servers (that use catalyst
as well) - all you need to do is to refresh config on HUP.

2009/2/22 Jonathan Rockway <jon at jrock.us>

> * On Sat, Feb 21 2009, Oleg Pronin wrote:
> > I use Catalyst in extremely loaded projects (currently 60.000.000
> pageloads / day).
> > Thereforce i'm perfomance paranoid man.
> >
> > One of 'black stones' is the ->config method. It has dramatically slow
> perfomance at
> > config_method:  1 wallclock secs ( 1.06 usr +  0.00 sys =3D  1.06 CPU) @
> 3808.94/s (n=3D
> > 4047)
>
> I have to ask... is this actually slowing down your application?  Let's
> say that your app spends 1% of its time in $c->config.  If you made
> $c->config 10000x faster, you would only make your app 1% faster.
>
> > It would be VERY GREAT if we somehow make ->config works a hundred
> > times faster because everybody use ->config without any suspicions on
> > its speed.
>
> Although I haven't noticed config calls slowing down my application, I
> look forward to seeing your patch for this.
>
> FWIW, I usually only call $c->config at app startup time; I read it and
> pass values in it as arguments to other classes that need configuration
> information.  I'm pretty sure this is the intended use; you shouldn't be
> looking in it during requests.
>
> Regards,
> Jonathan Rockway
>
> --
> print just =3D> another =3D> perl =3D> hacker =3D> if $,=3D$"
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090222/4dd0c=
d81/attachment.htm


More information about the Catalyst mailing list