schema/spacewalk/spacewalk-sql | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 45281adb4a131f2dcc3ce38fed18700c850277db
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jan 19 16:00:19 2011 +0100
Using array should be faster than appending string.
diff --git a/schema/spacewalk/spacewalk-sql b/schema/spacewalk/spacewalk-sql
index d9e5fd5..ad831d8 100755
--- a/schema/spacewalk/spacewalk-sql
+++ b/schema/spacewalk/spacewalk-sql
@@ -86,21 +86,21 @@ if ($options{db_backend} eq 'oracle') {
die "The config file [$config_file] specifies unknown db_backend
[$options{db_backend}] \n";
}
-my $out = '';
+my @out;
while (<$rfh>) {
if ($select_direct) {
print;
}
- $out .= $_;
+ push @out, $_;
}
close $rfh;
waitpid $pid, 0;
if ($?) {
my $ret = $? >> 8;
- print STDERR $out;
+ print STDERR @out;
exit $ret;
} elsif ($select_mode) {
- print $out;
+ print @out;
}
exit;
Show replies by date