[Catalyst] uri_for and Chained actions

Oleg Pronin syber.rus at gmail.com
Fri Oct 12 17:31:19 GMT 2007


I have a hundred of <img src=3D"...."> and a hundred of <a href=3D".."> per=
 page
on 1-2mln hosts/day project.

If your project is not under subfolder of some domain then there is no need
to call
<img src=3D"[%c.uri_for('/images/img.jpg')%]"/>
instead of <img src=3D"/images/img.jpg"/>
as they are both pointing to the same place.

2007/10/12, Matt S Trout <dbix-class at trout.me.uk>:

> On Thu, Oct 11, 2007 at 02:51:31AM +0400, Oleg Pronin wrote:
> > If your project is heavy loaded then i think the best way is to write:
> > <form action=3D"/myapp/[%object.id%]/update">
> > or (easy to change):
> > <form action=3D"[%object.update_url%]">
> > in Object:
> > sub update_url {'/myapp/'.shift->id.'/update}
> >
> > because Catalyst.uri_for() still takes to much CPU to call it a hundred
> > times per page.
>
> It's a -lot- faster in the latest release. Are you sure this is still the
> bottleneck you think it is?
>
> --
>      Matt S Trout       Need help with your Catalyst or DBIx::Class
> project?
>   Technical Director
> http://www.shadowcat.co.uk/catalyst/
> Shadowcat Systems Ltd.  Want a managed development or deployment platform?
> http://chainsawblues.vox.com/
> http://www.shadowcat.co.uk/servers/
>
> _______________________________________________
> 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.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071012/f2ecf=
91e/attachment.htm


More information about the Catalyst mailing list