Profile Title::getLinkUrl()
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 20 Feb 2009 11:09:04 +0000 (11:09 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 20 Feb 2009 11:09:04 +0000 (11:09 +0000)
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().)

includes/Title.php

index 94ad845..6e232aa 100644 (file)
@@ -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__ );
        }
 
        /**