[FileRepo] Disabled ancient migration code, kills performance.
authorAaron <aschulz@wikimedia.org>
Fri, 18 May 2012 22:35:23 +0000 (15:35 -0700)
committerAaron <aschulz@wikimedia.org>
Fri, 18 May 2012 22:35:23 +0000 (15:35 -0700)
Change-Id: I6ed49f447dda3235e22edbbf837dad66c66d0764

includes/filerepo/backend/FileBackendStore.php
includes/filerepo/file/LocalFile.php

index 7d32bec..88efe79 100644 (file)
@@ -564,6 +564,8 @@ abstract class FileBackendStore extends FileBackend {
                        $this->trimCache(); // limit memory
                        $this->cache[$path]['stat'] = $stat;
                        $this->setFileCache( $path, $stat ); // update persistent cache
+               } else {
+                       wfDebug( __METHOD__ . ": File $path does not exist.\n" );
                }
                wfProfileOut( __METHOD__ . '-' . $this->name );
                wfProfileOut( __METHOD__ );
index 6ac6ae4..36ec58f 100644 (file)
@@ -632,6 +632,9 @@ class LocalFile extends File {
 
        /**
         * Fix thumbnail files from 1.4 or before, with extreme prejudice
+        * @TODO: do we still care about this? Perhaps a maintenance script
+        *        can be made instead. Enabling this code results in a serious
+        *        RTT regression for wikis without 404 handling.
         */
        function migrateThumbFile( $thumbName ) {
                $thumbDir = $this->getThumbPath();
@@ -654,10 +657,12 @@ class LocalFile extends File {
                }
                */
 
+               /*
                if ( $this->repo->fileExists( $thumbDir ) ) {
                        // Delete file where directory should be
                        $this->repo->cleanupBatch( array( $thumbDir ) );
                }
+               */
        }
 
        /** getHandler inherited */