[FileBackend] Optimize the case were no operations are provided.

Change-Id: Iaf858ce2e8b21e031d27b984029f0424518201af
This commit is contained in:
Aaron Schulz 2013-05-10 13:45:34 -07:00
parent e281c6f699
commit 6b1194b9da

View file

@ -1134,6 +1134,10 @@ abstract class FileBackendStore extends FileBackend {
wfProfileIn( __METHOD__ . '-' . $this->name );
$status = Status::newGood();
if ( !count( $ops ) ) {
return $status; // nothing to do
}
// Fix up custom header name/value pairs...
$ops = array_map( array( $this, 'stripInvalidHeadersFromOp' ), $ops );
@ -1186,6 +1190,10 @@ abstract class FileBackendStore extends FileBackend {
wfProfileIn( __METHOD__ . '-' . $this->name );
$status = Status::newGood();
if ( !count( $ops ) ) {
return $status; // nothing to do
}
// Fix up custom header name/value pairs...
$ops = array_map( array( $this, 'stripInvalidHeadersFromOp' ), $ops );