From 16cfc9940b2b12a9d51f673425cbbec49d9c435d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 4 Apr 2009 17:51:13 +0000 Subject: [PATCH] profiling fixes --- includes/filerepo/LocalFile.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 04703d9901..fcd9d12714 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -333,12 +333,14 @@ class LocalFile extends File # Don't destroy file info of missing files if ( !$this->fileExists ) { wfDebug( __METHOD__.": file does not exist, aborting\n" ); + wfProfileOut( __METHOD__ ); return; } $dbw = $this->repo->getMasterDB(); list( $major, $minor ) = self::splitMime( $this->mime ); if ( wfReadOnly() ) { + wfProfileOut( __METHOD__ ); return; } wfDebug(__METHOD__.': upgrading '.$this->getName()." to the current schema\n"); @@ -1441,6 +1443,7 @@ class LocalFileDeleteBatch { // Roll back inserts, release lock and abort // TODO: delete the defunct filearchive rows if we are using a non-transactional DB $this->file->unlockAndRollback(); + wfProfileOut( __METHOD__ ); return $this->status; } -- 2.20.1