On 8/22/06, Josef Chladek <[EMAIL PROTECTED]> wrote:
[... gets slower ...]
Yes, that's definitely strange and interesting and warrants further investigation...
Down another avenue: I haven't tried this myself as I don't have 20 different schemas/models to load at once, and so I'm not sure if it would break things, but you might try this hack in your mod_perl startup.pl thingy before the app loads:
--------------------------------------
use Class::C3;
{
no warnings 'redefine';
local *Class::C3::reinitialize = sub { };
my @schema_classes = qw/ XMLForm::Schema::xxxx XMLForm::Schema::yyyy ..... /;
$_->require for (@schema_classes);
}
Class::C3::reinitialize();
--------------------------------------
It might screw up source registrations, I'm not sure at this point. If it does, perhaps we can make some changes in DBIC to make this sort of hack possible (or even make a sane patch for globally lazy C3 reinit with some sort of sane interface).
-- Brandon
to make mod_perl the same speed I put in my perl_startup.pl
use XMLForm::Model::xxxx
use XMLForm::Schema::xxxx
for ALL my models -> same speed.
WM 0.097695 at /Library/Perl/5.8.6/Catalyst/Model/DBIC/Schema.pm line
304.
[... gets slower ...]
UserDepotExternal 0.52905 at /Library/Perl/5.8.6/Catalyst/Model/DBIC/
Schema.pm line 304.
is the result (+/-) for the three test-scenarios.
if I put 'WM' as the last to be 'newed', I get
WM 0.544998 at /Library/Perl/5.8.6/Catalyst/Model/DBIC/Schema.pm line
304.
this is strange, is not it?
Yes, that's definitely strange and interesting and warrants further investigation...
Down another avenue: I haven't tried this myself as I don't have 20 different schemas/models to load at once, and so I'm not sure if it would break things, but you might try this hack in your mod_perl startup.pl thingy before the app loads:
--------------------------------------
use Class::C3;
{
no warnings 'redefine';
local *Class::C3::reinitialize = sub { };
my @schema_classes = qw/ XMLForm::Schema::xxxx XMLForm::Schema::yyyy ..... /;
$_->require for (@schema_classes);
}
Class::C3::reinitialize();
--------------------------------------
It might screw up source registrations, I'm not sure at this point. If it does, perhaps we can make some changes in DBIC to make this sort of hack possible (or even make a sane patch for globally lazy C3 reinit with some sort of sane interface).
-- Brandon
_______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
