[Dbix-class] C3 + bleadperl

Brandon Black blblack at gmail.com
Sat Apr 14 21:46:02 GMT 2007


I have a patch out there that adds the C3 mro (as well as
next::method, and localized method cache invalidation, etc) to
bleadperl, as well as a new dev release of Class::C3 (
http://search.cpan.org/~blblack/Class-C3-0.15_01/ ) that knows about
the patch and gets out of the way (so that software that uses
Class::C3 automatically gets the benefits of the patched bleadperl).

The patch's status for inclusion in 5.9.5/5.10.0 is still up in the
air, but its looking likely that it's going to get a fair shot at it
(at the very least, some maintainers are taking a serious look and
would like to get it in there if it works out).  Since DBIx::Class
users comprise the biggest chunk of existing Class::C3 users, I
thought I'd post a note here to try it out if you can.  If you grab
the Class::C3 dev release from CPAN, it contains the patch itself, as
well as a link to a snapshot of bleadperl and instructions for how to
apply the patch and build/install bleadperl into a separate directory.

Aside from "correctness" improvements over the current C3 situation
(like not really needing "initialize()" any more, and no more funky
method cache workarounds), the performance upgrades look decent too.
Loading a test DBIx::Class::Schema (perl -MMy::Schema -e1) with 1000
source classes in separate files got about 40% faster in my tests.
"time make test" for DBIx::Class got a bit better than twice as fast.
next::method, when tested in isolation and taking full advantage of
whatever caching is available in both cases, got ~570% (yes that's not
a typo) faster.

So please, if you have the time/tuits to grab a bealdperl snapshot and
try this patch with your DBIC-using software, give it a shot, help me
find any bugs, etc :)

Thanks,
-- Brandon



More information about the Dbix-class mailing list