Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/242843
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/242843/1 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: newchange Gerrit-Change-Id: I2dc216f36d3a0ea2285e64122b4d07bd9c8ae703 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits