]> git.donarmstrong.com Git - debbugs.git/commitdiff
load resultset helper; preload 2000 bugs at a time
authorDon Armstrong <don@donarmstrong.com>
Wed, 8 Mar 2017 03:02:08 +0000 (19:02 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 8 Mar 2017 03:02:08 +0000 (19:02 -0800)
Debbugs/DB/ResultSet/Bug.pm

index 5dbd5aa52f3203c3a3e3044093788bc768a1eefd..503fe7e5761a35a218cbc65404defb75428cad25 100644 (file)
@@ -23,6 +23,8 @@ use strict;
 use warnings;
 
 use base 'DBIx::Class::ResultSet';
+__PACKAGE__->load_components('Helper::ResultSet');
+
 use Debbugs::DB::Util qw(select_one);
 
 use List::MoreUtils qw(natatime);
@@ -44,7 +46,7 @@ for first time.
 sub quick_insert_bugs {
     my ($self,@bugs) = @_;
 
-    my $it = natatime 300, @bugs;
+    my $it = natatime 2000, @bugs;
 
     while (my @b = $it->()) {
        $self->result_source->schema->