https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112735

Revision: 112735
Author:   tstarling
Date:     2012-02-29 22:30:23 +0000 (Wed, 29 Feb 2012)
Log Message:
-----------
Fix comment from r54410, add rationale for using MySQL command line pipe

Modified Paths:
--------------
    trunk/phase3/maintenance/populateImageSha1.php

Modified: trunk/phase3/maintenance/populateImageSha1.php
===================================================================
--- trunk/phase3/maintenance/populateImageSha1.php      2012-02-29 22:19:16 UTC 
(rev 112734)
+++ trunk/phase3/maintenance/populateImageSha1.php      2012-02-29 22:30:23 UTC 
(rev 112735)
@@ -74,7 +74,10 @@
                $imageTable = $dbw->tableName( 'image' );
 
                if ( $method == 'pipe' ) {
-                       // @todo FIXME: Kill this and replace with a second 
unbuffered DB connection.
+                       // Opening a pipe allows the SHA-1 operation to be done 
in parallel 
+                       // with the database write operation, because the 
writes are queued
+                       // in the pipe buffer. This can improve performance by 
up to a 
+                       // factor of 2. 
                        global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
                        $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
                                ' -h' . wfEscapeShellArg( $wgDBserver ) .


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to