optimisation: detect scan mode and avoid generating image

master
Joey Hess 2008-01-09 02:31:11 -05:00
parent 50faf0b151
commit a654a72fda
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,11 @@ sub preprocess (@) { #{{{
}
push @{$links{$params{page}}}, $image;
# optimisation: detect scan mode, and avoid generating the image
if (! defined wantarray) {
return;
}
my $file = bestlink($params{page}, $image);
my $dir = $params{page};