[Catalyst] dbic models and startup time server
Josef Chladek
j.chladek at wirtschaftsblatt.at
Tue Aug 22 09:51:31 CEST 2006
Am 22.08.2006 um 00:54 schrieb Brandon Black:
> Yes, or take a stab at improving the performance yourself of course :)
well, could you point me in the direction where 'most' of the time is
spent during startup? is it the connect, checking, preloading, ...?
which module? we might do our best to help...
> Are all of your 20 models using the same schema, or is it 20 unique
> schemas that are truly different? (You could probably shave
> considerable time by reusing identical schema classes rather than
> duplicating them, for instance - same goes for identical source
> classes referenced by multiple schemas).
they are completely different, no duplicate code so far
> Another trick that has helped others is modify your source classes
> to use a common base which does the load_components part, such as:
>
> lib/MyDBICStuff/SourceBase.pm:
> package MyDBICStuff::SourceBase;
> use base qw/DBIx::Class/;
> __PACKAGE__->load_components(qw/PK::Auto Core/);
> 1;
>
> lib/XMLForm/Schema/BElogs/SomeTable.pm:
> package XMLForm::Schema::BElogs::SomeTable;
> use base qw/MyDBICStuff::SourceBase/;
> __PACKAGE__->table('sometable');
> # ... other usual source definition stuff
> 1;
tried that and changed all Table.pms (a lot of!), but there is no
noticeable effect
thanks anyway
josef
More information about the Catalyst
mailing list