Skip Menu |

This queue is for tickets about the DBIx-Class-Journal CPAN distribution.

Report information
The Basics
Id: 38493
Status: resolved
Priority: 0/
Queue: DBIx-Class-Journal

People
Owner: Nobody in particular
Requestors: jasonk@cpan.org (no email address)
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.02_01
Fixed in: (no value)



Subject: Journaling slows schema loading way, way, way down...
I have an application with a fairly large database. It was a little slow to startup before I tried using DBIx::Class::Journal... % time perl -Ilib -MMyApp::DB=journal,0 -e1 real 0m10.776s user 0m4.945s sys 0m0.252s Adding a journal sent the startup time spiraling from annoying to unbearable... % time perl -Ilib MyApp::DB=journal,1 -e1 real 3m15.309s user 3m7.045s sys 0m1.569s Devel::NYTProf reports that this is primarily due to increased calls to Class::C3... With journaling... Statements Executed: 25,252,916 Total Time: 375.849319996173 seconds Top offenders... 52,944 Class::C3::_apply_method_dispatch_table 52,934 Class::C3::_remove_method_dispatch_table Without journaling... Statements Executed: 11,465 Total Time: 0.115147999999999 seconds 31 Class::C3::_apply_method_dispatch_table 0 Class::C3::_remove_method_dispatch_table I attempted to fix this by temporarily overriding Class::C3::reinitialize, but that caused some of the test suite to fail. If I can figure out where it's safe to do that, I'll provide a patch as well... -- www.jasonkohles.com
Subject: Re: [rt.cpan.org #38493] Journaling slows schema loading way, way, way down...
Date: Mon, 18 Aug 2008 13:02:18 +0300
To: Jason Kohles via RT <bug-DBIx-Class-Journal [...] rt.cpan.org>
From: Yuval Kogman <nothingmuch [...] woobling.org>
Please try installing Class::C3::XS, or even better, Perl 5.10 (which has much faster c3 support built in). At the moment DBIx:Class::Journal is still missing some very fundamental features, so I don't think it's appropriate to start optimizing it yet. That said, I'll try to see if there's anything obvious causing this (FWIW, I didn't see such a slowdown for my schema which wasn't very large, but wasn't that small either). -- Yuval Kogman <nothingmuch@woobling.org> http://nothingmuch.woobling.org 0xEBD27418
On Thu Aug 14 16:33:19 2008, JASONK wrote: Show quoted text
> I have an application with a fairly large database. It was a little > slow to startup before I tried using DBIx::Class::Journal... > > % time perl -Ilib -MMyApp::DB=journal,0 -e1 > > real 0m10.776s > user 0m4.945s > sys 0m0.252s > > Adding a journal sent the startup time spiraling from annoying to > unbearable... > > % time perl -Ilib MyApp::DB=journal,1 -e1 > > real 3m15.309s > user 3m7.045s > sys 0m1.569s > > > Devel::NYTProf reports that this is primarily due to increased calls to > Class::C3... > > With journaling... > > Statements Executed: 25,252,916 > Total Time: 375.849319996173 seconds > > Top offenders... > 52,944 Class::C3::_apply_method_dispatch_table > 52,934 Class::C3::_remove_method_dispatch_table > > Without journaling... > > Statements Executed: 11,465 > Total Time: 0.115147999999999 seconds > > 31 Class::C3::_apply_method_dispatch_table > 0 Class::C3::_remove_method_dispatch_table > > I attempted to fix this by temporarily overriding > Class::C3::reinitialize, but that caused some of the test suite to fail. > If I can figure out where it's safe to do that, I'll provide a patch as > well... > > -- > www.jasonkohles.com
You may not even be using this module any more, but I'd really appreciate it if you could either give me a copy of your large schema or try this again with the new code. I've done some work that should speed this up significantly.
This currently makes NO speed difference at all. Please use the latest version and perl 5.10 or greater if your app is speed sensitive.