Index: branches/REL1_16/phase3/includes/api/ApiMain.php |
— | — | @@ -371,7 +371,7 @@ |
372 | 372 | // avoid sending public cache headers for errors. |
373 | 373 | $this->sendCacheHeaders(); |
374 | 374 | |
375 | | - if ( $this->mPrinter->getIsHtml() && !$this->mPrinter->isDisabled() ) { |
| 375 | + if ( $this->mPrinter->getIsHtml() ) { |
376 | 376 | echo wfReportTime(); |
377 | 377 | } |
378 | 378 | |
Index: branches/REL1_16/phase3/includes/api/ApiBase.php |
— | — | @@ -57,6 +57,7 @@ |
58 | 58 | const LIMIT_SML2 = 500; // Slow query, bot/sysop limit |
59 | 59 | |
60 | 60 | private $mMainModule, $mModuleName, $mModulePrefix; |
| 61 | + private $mParamCache = array(); |
61 | 62 | |
62 | 63 | /** |
63 | 64 | * Constructor |
— | — | @@ -472,16 +473,20 @@ |
473 | 474 | * @return array |
474 | 475 | */ |
475 | 476 | public function extractRequestParams( $parseLimit = true ) { |
476 | | - $params = $this->getFinalParams(); |
477 | | - $results = array(); |
| 477 | + // Cache parameters, for performance and to avoid bug 24564. |
| 478 | + if ( !isset( $this->mParamCache[$parseLimit] ) ) { |
| 479 | + $params = $this->getFinalParams(); |
| 480 | + $results = array(); |
478 | 481 | |
479 | | - if ( $params ) { // getFinalParams() can return false |
480 | | - foreach ( $params as $paramName => $paramSettings ) { |
481 | | - $results[$paramName] = $this->getParameterFromSettings( $paramName, $paramSettings, $parseLimit ); |
| 482 | + if ( $params ) { // getFinalParams() can return false |
| 483 | + foreach ( $params as $paramName => $paramSettings ) { |
| 484 | + $results[$paramName] = $this->getParameterFromSettings( |
| 485 | + $paramName, $paramSettings, $parseLimit ); |
| 486 | + } |
482 | 487 | } |
| 488 | + $this->mParamCache[$parseLimit] = $results; |
483 | 489 | } |
484 | | - |
485 | | - return $results; |
| 490 | + return $this->mParamCache[$parseLimit]; |
486 | 491 | } |
487 | 492 | |
488 | 493 | /** |
Property changes on: branches/REL1_16/phase3/includes/api/ApiBase.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
489 | 494 | Merged /branches/wmf-deployment/includes/api/ApiBase.php:r53381,59952 |
490 | 495 | Merged /branches/REL1_15/phase3/includes/api/ApiBase.php:r51646 |
491 | 496 | Merged /branches/wmf/1.16wmf4/includes/api/ApiBase.php:r70064 |
492 | 497 | Merged /branches/sqlite/includes/api/ApiBase.php:r58211-58321 |
493 | 498 | Merged /trunk/phase3/includes/api/ApiBase.php:r63549,63764,63897-63901,64454,64881,64948,69339,69347,69350,69369,69379,69776,69931,70062 |
Property changes on: branches/REL1_16/phase3/includes/api |
___________________________________________________________________ |
Modified: svn:mergeinfo |
494 | 499 | Merged /branches/wmf/1.16wmf4/includes/api:r70064 |