Graphicsmagick / imagemagick have very poor performance with images
with large pixel sizes. The bisector can generate some very large
images.
In an example I have seen, a 21595x21048 png, occupying only 2.6Mby of
disk space. An invocation of `convert' to resize this was using 3Gby
of RAM and lots of CPU. Whereas, the pbm utilities can process this
with much less memory and a tiny fraction of the cpu time.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
}
1;
}) {
- system_checked("convert -resize $c{BisectionRevisonGraphSize}".
- " $graphfile.png $graphfile.mini.png");
+ my $gsize = $c{BisectionRevisonGraphSize};
+ system_checked("pngtopnm <$graphfile.png".
+ " | pnmscale -xysize ".
+ ($gsize =~ m/^(\d+)x(\d+)$/ ? "$1 $2" :
+ $gsize =~ m/^(\d+)$/ ? "$1 $1" :
+ die "$gsize ?").
+ " | pnmtopng >$graphfile.mini.png");
print HTML <<END or die $!;
<h2>Revision graph overview</h2>
<img src="$href.mini.png">