Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/70535
Change subject: Add more profiling hooks. ...................................................................... Add more profiling hooks. I'm trying to dig up why my indexing of jawiki is so slow and these can only be useful. Change-Id: I80cf8bbd920f27d3f03d273ba9926088a0a00dc0 --- M CirrusSearchUpdater.php M forceSolrIndex.php 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/35/70535/1 diff --git a/CirrusSearchUpdater.php b/CirrusSearchUpdater.php index 6d8ea3e..2ecceac 100644 --- a/CirrusSearchUpdater.php +++ b/CirrusSearchUpdater.php @@ -32,17 +32,21 @@ $host = $client->getAdapter()->getHost(); $work = new PoolCounterWorkViaCallback( 'CirrusSearch-Update', "_solr:host:$host", array( 'doWork' => function() use ( $client, $pageData ) { + wfProfileIn( __METHOD__ ); $update = $client->createUpdate(); foreach ( $pageData as $page ) { // @todo When $text is null, we only want to update the title, not the whole document $update->addDocument( CirrusSearchUpdater::buildDocumentforRevision( $page['rev'], $page['text'] ) ); } try { + wfProfileIn( __METHOD__ . '::sendToSolr' ); $result = $client->update( $update ); + wfProfileOut( __METHOD__ . '::sendToSolr' ); wfDebugLog( 'CirrusSearch', 'Update completed in ' . $result->getQueryTime() . ' millis and has status ' . $result->getStatus() ); } catch ( Solarium_Exception $e ) { error_log( "CirrusSearch update failed caused by: " . $e->getMessage() ); } + wfProfileOut( __METHOD__ ); } ) ); $work->execute(); diff --git a/forceSolrIndex.php b/forceSolrIndex.php index f2151d8..6f14094 100644 --- a/forceSolrIndex.php +++ b/forceSolrIndex.php @@ -158,11 +158,13 @@ } $result = array(); foreach ( $res as $row ) { + wfProfileIn( __METHOD__ . '::decodeResults' ); $rev = Revision::newFromRow( $row ); $result[] = array( 'rev' => $rev, 'text' => $search->getTextFromContent( $rev->getTitle(), $rev->getContent() ) ); + wfProfileOut( __METHOD__ . '::decodeResults' ); } wfProfileOut( __METHOD__ ); return $result; -- To view, visit https://gerrit.wikimedia.org/r/70535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80cf8bbd920f27d3f03d273ba9926088a0a00dc0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles <never...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits