Commit bbb81025 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Use a row cache and fetchall_arrayref() instead of single calls to

fetchrow_arrayref().
parent 4e00396a
......@@ -1275,7 +1275,8 @@ sub _objs_from_sth {
my $slice_name = $this->slice()->name();
my $slice_start = $this->slice()->start();
while ( my $entry = $sth->fetchrow_arrayref() ) {
while ( my $rowcache = $sth->fetchall_arrayref( undef, 1000 ) ) {
while ( my $entry = shift( @{$rowcache} ) ) {
if ( !defined($segment)
|| $segment !=
$SEQ_REG_MAP{$slice_name}{ $entry->[ENTRY_SEQREGIONID] } )
......@@ -1308,7 +1309,8 @@ sub _objs_from_sth {
$entry->[ENTRY_SEQREGIONEND] = $end - 1;
push( @features, [ @{$entry} ] );
} ## end while ( my $entry = $sth->fetchrow_arrayref...
} ## end while ( my $entry = shift...
} ## end while ( my $rowcache = $sth...
$sth->finish();
return \@features;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment