From: Aryeh Gregor Date: Fri, 20 Feb 2009 11:09:04 +0000 (+0000) Subject: Profile Title::getLinkUrl() X-Git-Tag: 1.31.0-rc.0~42774 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=9b810d7cd2fccbcc58e0232e4ddf016a37817b67;p=lhc%2Fweb%2Fwiklou.git Profile Title::getLinkUrl() Linker::linkUrl() is >100us, it seems, and a lot of that might be Title::getLinkUrl(). (RC on enwiki with 500 rows takes 6s to generate, and 2s is spent on Linker::link().) --- diff --git a/includes/Title.php b/includes/Title.php index 94ad8457da..6e232aa10b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -867,6 +867,7 @@ class Title { * @return \type{\string} the URL */ public function getLinkUrl( $query = array(), $variant = false ) { + wfProfileIn( __METHOD__ ); if( !is_array( $query ) ) { throw new MWException( 'Title::getLinkUrl passed a non-array for '. '$query' ); @@ -880,6 +881,7 @@ class Title { return $this->getLocalURL( $query, $variant ) . $this->getFragmentForURL(); } + wfProfileOut( __METHOD__ ); } /**