jenkins-bot has submitted this change and it was merged. Change subject: Made WikiPage::isRedirect() actually use page_is_redirect ......................................................................
Made WikiPage::isRedirect() actually use page_is_redirect * Previously it would always fetch the whole content, which is silly since followRedirect() uses the redirect table to avoid loading the text. The initializeArticle() uses isRedirect() and then possibly followRedirect(). It makes no sense for the former to fetch all the text anway. * The time fetching the text showed up on xenon flamegraphs. Change-Id: I2dc216f36d3a0ea2285e64122b4d07bd9c8ae703 --- M includes/page/WikiPage.php 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 708a875..d3978ea 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -469,12 +469,11 @@ * @return bool */ public function isRedirect() { - $content = $this->getContent(); - if ( !$content ) { - return false; + if ( !$this->mDataLoaded ) { + $this->loadPageData(); } - return $content->isRedirect(); + return (bool)$this->mIsRedirect; } /** -- To view, visit https://gerrit.wikimedia.org/r/242843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2dc216f36d3a0ea2285e64122b4d07bd9c8ae703 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits