diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-11 09:32:36 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-11 09:32:36 +0000 |
commit | a143aa49f06c1fd785cd999dfffb8832c0c337d0 (patch) | |
tree | e533f32d5d188f3a372046732579c41289e53cd3 | |
parent | 98724a9312a1d857a2aca8dbe354221e7a390124 (diff) | |
download | drakx-a143aa49f06c1fd785cd999dfffb8832c0c337d0.tar drakx-a143aa49f06c1fd785cd999dfffb8832c0c337d0.tar.gz drakx-a143aa49f06c1fd785cd999dfffb8832c0c337d0.tar.bz2 drakx-a143aa49f06c1fd785cd999dfffb8832c0c337d0.tar.xz drakx-a143aa49f06c1fd785cd999dfffb8832c0c337d0.zip |
(parse_file) speed up it by 20% (#8412) but logcolorize is the top one
in profiles
-rwxr-xr-x | perl-install/standalone/logdrake | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index b484bf3cb..67eef87d2 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -253,6 +253,15 @@ sub parse_file { my $taille = @all; my $i = 0; + my $test; + if ($en && !$ey) { + $test = sub { !/$en/o }; + } elsif ($ey && !$en) { + $test = sub { /$ey/o }; + } else { + $test = sub { /$ey/o && !/$en/o }; + } + foreach (@all) { $i++; if ($pbar && $i % 10) { @@ -260,9 +269,7 @@ sub parse_file { $win_pb->window->process_updates(1); # no gtkflush() because we do not want to refresh the TextView } - if ($en eq "" && /$ey/i) { logcolorize($_); next } - if (! /$en/i && /$ey/i) { logcolorize($_); next } - if (! /$en/i && $ey eq "") { logcolorize($_); next } + logcolorize($_) if $test; } $win_pb->destroy if !$::isEmbedded || !$isExplain; |