From: Ian Jackson Subject: [OSSTEST PATCH 1/6] cs-bisection-step: Use pbm tools, not graphicsmagick/imagemagick Date: Fri, 1 May 2015 16:02:43 +0100 Message-ID: <1430492568-1761-2-git-send-email-ian.jackson@eu.citrix.com> References: <21827.30808.198577.574772@mariner.uk.xensource.com> <1430492568-1761-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YoCT7-0005pQ-Gy for xen-devel@lists.xenproject.org; Fri, 01 May 2015 15:03:09 +0000 In-Reply-To: <1430492568-1761-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- cs-bisection-step | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cs-bisection-step b/cs-bisection-step index d5f8cb8..c9c8bb6 100755 --- a/cs-bisection-step +++ b/cs-bisection-step @@ -992,8 +992,13 @@ END } 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 <Revision graph overview -- 1.7.10.4