[FileBackend] Optimize the case were no operations are provided.
Change-Id: Iaf858ce2e8b21e031d27b984029f0424518201af
This commit is contained in:
parent
e281c6f699
commit
6b1194b9da
1 changed files with 8 additions and 0 deletions
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue