Merge "Free up some memory by unsetting large arrays in backend copy script."
authorDemon <chadh@wikimedia.org>
Wed, 18 Jul 2012 19:13:26 +0000 (19:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Jul 2012 19:13:26 +0000 (19:13 +0000)
maintenance/copyFileBackend.php

index 544f48b..498bc6b 100644 (file)
@@ -90,6 +90,8 @@ class CopyFileBackend extends Maintenance {
                                // Only copy the missing files over in the next loop
                                $srcPathsRel = array_diff( $relFilesSrc, $relFilesDst );
                                $this->output( count( $srcPathsRel ) . " file(s) need to be copied.\n" );
+                               unset( $relFilesSrc );
+                               unset( $relFilesDst );
                        }
 
                        $batchPaths = array();