From fcd9fbfbf835ab0031c331f892ae6f1098ba12f4 Mon Sep 17 00:00:00 2001 From: Tpt Date: Mon, 3 Dec 2012 22:03:53 +0100 Subject: [PATCH] (bug 42466) Allow djvutxt to use more memory The djvutxt utility of DjVuLibre 3.5.24 packed with Ubuntu 12.04 use a lot of memory more that the old version packed with Ubuntu 10.04. S, to work, the memory limit must be increased. User:Phe suggest that this increase of memory consumption is maybe caused by the loading of localisations file at the start of the tool. Change-Id: Ia735e1b7d71f5aa512fb14e444989854c440074e --- includes/media/DjVuImage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/media/DjVuImage.php b/includes/media/DjVuImage.php index e2fcaa932c..bdedbd1488 100644 --- a/includes/media/DjVuImage.php +++ b/includes/media/DjVuImage.php @@ -252,7 +252,7 @@ class DjVuImage { $cmd = wfEscapeShellArg( $wgDjvuTxt ) . ' --detail=page ' . wfEscapeShellArg( $this->mFilename ) ; wfDebug( __METHOD__.": $cmd\n" ); $retval = ''; - $txt = wfShellExec( $cmd, $retval ); + $txt = wfShellExec( $cmd, $retval, array(), array( 'memory' => 300000 ) ); wfProfileOut( 'djvutxt' ); if( $retval == 0) { # Strip some control characters -- 2.20.1