jenkins-bot has submitted this change and it was merged.
Change subject: Use wb_terms table for label lookup.
......................................................................
Use wb_terms table for label lookup.
The default TermLookup should hit the wb_terms table instead of
loading full entities.
NOTE: EntityTermLookup is currently uncached. Several quick SQL
queries still seem better than loading the same number of full
entity blobs from memcached. See T74309 for thoughts on caching
terms.
DEPLOYMENT: Keep an eye on DB load, wb_terms table in particular.
Also note that this change should reduce memcached i/o significantly.
Bug: T72767
Change-Id: Ib16da3dcd3bb1f3da1aac9c4a732c7b891756371
---
M repo/includes/WikibaseRepo.php
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Thiemo Mättig (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 2b89aa0..09af544 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -48,6 +48,7 @@
use Wikibase\Lib\Store\EntityContentDataCodec;
use Wikibase\Lib\Store\EntityLookup;
use Wikibase\Lib\Store\EntityRetrievingTermLookup;
+use Wikibase\Lib\Store\EntityTermLookup;
use Wikibase\Lib\Store\EntityTitleLookup;
use Wikibase\Lib\Store\LanguageLabelLookup;
use Wikibase\Lib\Store\TermLookup;
@@ -490,7 +491,7 @@
* @return TermLookup
*/
public function getTermLookup() {
- return new EntityRetrievingTermLookup( $this->getEntityLookup()
);
+ return new EntityTermLookup( $this->getStore()->getTermIndex(),
$this->getEntityLookup() );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/176650
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib16da3dcd3bb1f3da1aac9c4a732c7b891756371
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits