[Catalyst] TT macro to avoid excessive $c->uri_for calls

Matt S Trout dbix-class at trout.me.uk
Tue Aug 7 13:53:50 GMT 2007


On Tue, Aug 07, 2007 at 09:43:30AM +0200, Tobias Kremer wrote:
> I'm wondering if it has any bad side effects to have a TT macro which is set to
> $c->uri_for. If I'm remembering previous posts on this topic correctly, calling
> uri_for() repeatedly has quite a big impact on performance which really matters
> most for my current application. I have this in a global macros.tt2 file:

That's why we optimised the living crap out of uri_for.

It's more than 10x faster than it used to be.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/                    http://www.shadowcat.co.uk/ 



More information about the Catalyst mailing list