[Catalyst] Performance

Dave Rolsky autarch at urth.org
Fri Mar 9 18:51:57 GMT 2007


On Fri, 9 Mar 2007, Andy Grundman wrote:

> We've been discussing this a bit in #catalyst-dev.  I think Memoize would 
> work, but it needs to be done carefully so it works with all our different 
> varieties of calling uri_for, and also with multiple Catalyst apps running 
> under the same mod_perl instance, for example.

It might be safer and simpler to not use Memoize, and store the 
memoizations in the Catalyst object passed into the method. That'd avoid 
the multi-app problem. Another potential problem using Memoize is that you 
could have more or less unlimited memory bloat over time. By storing this 
in the object, you ensure that the cache is cleaned regularly.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/



More information about the Catalyst mailing list