From: Aaron Date: Fri, 18 May 2012 22:35:23 +0000 (-0700) Subject: [FileRepo] Disabled ancient migration code, kills performance. X-Git-Tag: 1.31.0-rc.0~23567 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=d0facbf7b1a23546c4ba922d5523191b6036cb0e;p=lhc%2Fweb%2Fwiklou.git [FileRepo] Disabled ancient migration code, kills performance. Change-Id: I6ed49f447dda3235e22edbbf837dad66c66d0764 --- 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 */