skip recalculation of unprogressed data
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 5 Sep 2019 20:08:37 +0000 (22:08 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 5 Sep 2019 21:56:49 +0000 (23:56 +0200)
graph

diff --git a/graph b/graph
index e76ec645492b138a49ddfb11a52f1adf2e4b2088..c4ebd20449a02f99205d59cc5968fe7327d83e36 100755 (executable)
--- a/graph
+++ b/graph
@@ -53,13 +53,13 @@ while (readline) {
        }
        push @lines, $_;
 }
        }
        push @lines, $_;
 }
-@lines or exit;
 
 $SIG{INT} = 'DEFAULT';
 
 sub show_lines {
 
 state $nr = 0;
 
 $SIG{INT} = 'DEFAULT';
 
 sub show_lines {
 
 state $nr = 0;
+@lines and @lines > $nr or return;
 
 my @order  = sort { $b <=> $a } grep { length } @values;
 my $maxval = $order[0];
 
 my @order  = sort { $b <=> $a } grep { length } @values;
 my $maxval = $order[0];