[Bast-commits] r9030 - DBIx-Class/0.08/trunk/maint
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sat Mar 20 08:00:00 GMT 2010
Author: ribasushi
Date: 2010-03-20 08:00:00 +0000 (Sat, 20 Mar 2010)
New Revision: 9030
Added:
DBIx-Class/0.08/trunk/maint/benchmark_datafetch.pl
Log:
Something is wrong with HRI inflation - too slow
Added: DBIx-Class/0.08/trunk/maint/benchmark_datafetch.pl
===================================================================
--- DBIx-Class/0.08/trunk/maint/benchmark_datafetch.pl (rev 0)
+++ DBIx-Class/0.08/trunk/maint/benchmark_datafetch.pl 2010-03-20 08:00:00 UTC (rev 9030)
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../t/lib";
+use lib "$FindBin::Bin/../lib";
+use DBICTest;
+
+my $schema = DBICTest->init_schema();
+my $rs = $schema->resultset ('Artist');
+$rs->populate ([ map { { name => "Art_$_"} } (1 .. 3000) ]);
+
+use Benchmark qw/cmpthese/;
+
+cmpthese(-1, {
+ 'Cursor' => sub { $rs->reset; my @r = $rs->cursor->all },
+ 'HRI' => sub { $rs->reset; my @r = $rs->search ({}, { result_class => 'DBIx::Class::ResultClass::HashRefInflator' } )->all },
+ 'RowObj' => sub { $rs->reset; my @r = $rs->all },
+});
Property changes on: DBIx-Class/0.08/trunk/maint/benchmark_datafetch.pl
___________________________________________________________________
Added: svn:executable
+ *
More information about the Bast-commits
mailing list