jenkins-bot has submitted this change and it was merged.
Change subject: Made ProfilerStub return null instead of a dummy ScopedCallback
......................................................................
Made ProfilerStub return null instead of a dummy ScopedCallback
* This can happen well over 10k times per request due to the message
hooks. Avoiding the object construction seems prudent.
Change-Id: I45ff7b8c10851f15a25cbea9a2df3669ec21dbd3
---
M includes/profiler/Profiler.php
M includes/profiler/ProfilerStub.php
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Chad: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index 69470fd..1c9824a 100644
--- a/includes/profiler/Profiler.php
+++ b/includes/profiler/Profiler.php
@@ -134,7 +134,7 @@
/**
* @param ScopedCallback $section
*/
- public function scopedProfileOut( ScopedCallback &$section ) {
+ public function scopedProfileOut( ScopedCallback &$section = null ) {
$section = null;
}
diff --git a/includes/profiler/ProfilerStub.php
b/includes/profiler/ProfilerStub.php
index 5580f94..1d04536 100644
--- a/includes/profiler/ProfilerStub.php
+++ b/includes/profiler/ProfilerStub.php
@@ -28,7 +28,7 @@
*/
class ProfilerStub extends Profiler {
public function scopedProfileIn( $section ) {
- return new ScopedCallback( null ); // no-op
+ return null; // no-op
}
public function getFunctionStats() {
--
To view, visit https://gerrit.wikimedia.org/r/199820
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I45ff7b8c10851f15a25cbea9a2df3669ec21dbd3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits