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

Slight speed increase from not creating new anonymous arrays.

parent da0d1d94
...@@ -14,8 +14,7 @@ use base( 'Bio::EnsEMBL::Collection', ...@@ -14,8 +14,7 @@ use base( 'Bio::EnsEMBL::Collection',
sub _create_feature { sub _create_feature {
my ( $this, $feature_type, $args ) = @_; my ( $this, $feature_type, $args ) = @_;
my @feature = my $feature = $this->SUPER::_create_feature( $feature_type, $args );
@{ $this->SUPER::_create_feature( $feature_type, $args ) };
my ( $hstart, $hend, $score, $repeat_consensus, $analysis ) = my ( $hstart, $hend, $score, $repeat_consensus, $analysis ) =
rearrange( [ 'HSTART', 'HEND', rearrange( [ 'HSTART', 'HEND',
...@@ -24,25 +23,25 @@ sub _create_feature { ...@@ -24,25 +23,25 @@ sub _create_feature {
], ],
@{$args} ); @{$args} );
push( @feature, push( @{$feature},
$hstart, $hend, $score, $repeat_consensus->dbID(), $hstart, $hend, $score, $repeat_consensus->dbID(),
$analysis->dbID() ); $analysis->dbID() );
return \@feature; return $feature;
} }
sub _create_feature_fast { sub _create_feature_fast {
my ( $this, $feature_type, $args ) = @_; my ( $this, $feature_type, $args ) = @_;
my @feature = my $feature =
@{ $this->SUPER::_create_feature_fast( $feature_type, $args ) }; $this->SUPER::_create_feature_fast( $feature_type, $args );
push( @feature, push( @{$feature},
$args->{'hstart'}, $args->{'hend'}, $args->{'score'}, $args->{'hstart'}, $args->{'hend'}, $args->{'score'},
$args->{'repeat_consensus'}->dbID(), $args->{'repeat_consensus'}->dbID(),
$args->{'analysis'}->dbID() ); $args->{'analysis'}->dbID() );
return \@feature; return $feature;
} }
1; 1;
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