[Catalyst] Re: two Catalyst flaws

Aristotle Pagaltzis pagaltzis at gmx.de
Thu Jan 3 21:13:02 GMT 2008


* Fayland Lam <fayland at gmail.com> [2008-01-03 11:00]:
> the first is to load all modules at beginning. I want to ask
> why?

If you load the modules on demand, then each child will have its
own duplicate copy of all demand-loaded modules, which adds up to
much higher memory consumption across processes.

If you load them up front, then the memory needed for the modules
will be shared among processes via fork().

> the second one is hard to use model in cron pl.

Did you use an existing Catalyst::Model::Foo? If so, use the Foo
module itself instead of trying to load ::Model::Foo in your non-
web code.

If you wrote the model code yourself, and you did it all inside
your Catalyst::Model subclass, well, that’s the wrong approach…

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list