On 17 Aug 2010, at 06:27, Octavian Rasnita wrote:
I load and store this object in the stash on each request in the Root::auto : Private method with:$c->stash(menu => $c->model('Menu'));But this would re-create the menu object on each request, and this takes time.
No, it wouldn't. The adaptor you showed has a lifetime of the application, and so it won't be recreated each request.
Also, even if you were creating an object every request (which you aren't), if you're worrying about this without numbers, then this is premature opimisation.
Cheers t0m _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
