From d0facbf7b1a23546c4ba922d5523191b6036cb0e Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 18 May 2012 15:35:23 -0700 Subject: [PATCH] [FileRepo] Disabled ancient migration code, kills performance. Change-Id: I6ed49f447dda3235e22edbbf837dad66c66d0764 --- includes/filerepo/backend/FileBackendStore.php | 2 ++ includes/filerepo/file/LocalFile.php | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/includes/filerepo/backend/FileBackendStore.php b/includes/filerepo/backend/FileBackendStore.php index 7d32beccda..88efe79862 100644 --- a/includes/filerepo/backend/FileBackendStore.php +++ b/includes/filerepo/backend/FileBackendStore.php @@ -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__ ); diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 6ac6ae48bf..36ec58f6b5 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -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 */ -- 2.20.1