Get all the information for blue links in one query.
Change-Id: I18cbaf69c5f75e00e48e27d4b5e7220f51c31808
return false;
}
+ /**
+ * Pre-cache page existence to speed up link generation
+ *
+ * @param IDatabase $db
+ * @param ResultWrapper $res
+ */
+ public function preprocessResults( $db, $res ) {
+ if ( !$res->numRows() ) {
+ return;
+ }
+
+ $batch = new LinkBatch();
+ foreach ( $res as $row ) {
+ $batch->add( $row->namespace, $row->title );
+ }
+ $batch->execute();
+
+ $res->seek( 0 );
+ }
+
public function getQueryInfo() {
return [
'tables' => [ 'page', 'watchlist' ],