From: Federico Leva Date: Fri, 23 Jan 2015 13:25:52 +0000 (+0100) Subject: Use a faster 7z command line by default X-Git-Tag: 1.31.0-rc.0~11179^2 X-Git-Url: http://git.cyclocoop.org/%27-%20%20.%20url_absolue%28find_in_path%28%27spip_style.css%27%29%29%20%20%20.%20url_absolue%28find_in_path%28%27prive/spip_style.css%27%29%29%20.%20%27?a=commitdiff_plain;h=e40b0455ca51132e21b753d2162b6059a578f725;p=lhc%2Fweb%2Fwiklou.git Use a faster 7z command line by default In tests with one typical XML dump, -mx=4 looked much better than -mx=5 in terms of CPU cost, with negligible losses in compression. Merged downstream by Wikia: https://github.com/Wikia/app/pull/6118 It probably makes sense to explicitly adopt a default suitable for XML dumps; but later this should be configurable in scripts etc. (T78669). Change-Id: I07ab5f93ecd6d706460691db5181de89ef31cbea --- diff --git a/includes/Export.php b/includes/Export.php index 4600feb5ad..0d55d7dbc1 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -1191,7 +1191,7 @@ class Dump7ZipOutput extends DumpPipeOutput { * @return string */ function setup7zCommand( $file ) { - $command = "7za a -bd -si " . wfEscapeShellArg( $file ); + $command = "7za a -bd -si -mx=4 " . wfEscapeShellArg( $file ); // Suppress annoying useless crap from p7zip // Unfortunately this could suppress real error messages too $command .= ' >' . wfGetNull() . ' 2>&1';