зеркало из https://github.com/mozilla/gecko-dev.git
Speed up data reading. Read it backwards and only as much as needed.
This commit is contained in:
Родитель
05210ca51d
Коммит
461bd7d97d
|
@ -197,13 +197,15 @@ sub load_buildlog {
|
|||
}
|
||||
|
||||
for $t (@treelist) {
|
||||
open(BUILDLOG, "<$t->{name}/build.dat" );
|
||||
while( <BUILDLOG> ){
|
||||
use Backwards;
|
||||
|
||||
my ($bw) = Backwards->new("$t->{name}/build.dat") or die;
|
||||
|
||||
while( $_ = $bw->readline ) {
|
||||
chomp;
|
||||
($mailtime, $buildtime, $buildname, $errorparser, $buildstatus, $logfile, $binaryname) =
|
||||
split( /\|/ );
|
||||
|
||||
|
||||
last if $buildtime < $mindate;
|
||||
$buildrec = {
|
||||
mailtime => $mailtime,
|
||||
buildtime => $buildtime,
|
||||
|
@ -215,13 +217,11 @@ sub load_buildlog {
|
|||
td => $t
|
||||
};
|
||||
if( $mailtime > 0
|
||||
&& $buildtime > $mindate
|
||||
&& ($form{noignore} || !($t->{ignore_builds}->{$buildname} != 0))
|
||||
){
|
||||
push @{$build_list}, $buildrec;
|
||||
}
|
||||
}
|
||||
close( BUILDLOG );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче