Page MenuHomePhabricator

Optimize ChangeHandler and AffectedPagesFinder
Closed, ResolvedPublic

Description

This is just a task to collect a few possible optimizations that I noticed while looking through the ChangeHandler/AffectedPagesFinder code for T265897: Create implicit use of description in content language. It doesn’t really have any AC, it can be closed as soon as all the related changes have been merged or abandoned.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 636064 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Use TitleFactory more efficiently

https://gerrit.wikimedia.org/r/636064

Change 636473 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Use LinkBatch in AffectedPagesFinder

https://gerrit.wikimedia.org/r/636473

Change 636475 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Remove AffectedPagesFinder::filterUpdates()

https://gerrit.wikimedia.org/r/636475

Change 636478 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Remove pointless LinkBatch in ChangeHandler

https://gerrit.wikimedia.org/r/636478

Change 636970 had a related patch set uploaded (by Tobias Andersson; owner: Tobias Andersson):
[mediawiki/extensions/Wikibase@master] Abort early if no usages or titles in ChangeHandler

https://gerrit.wikimedia.org/r/636970

Change 636970 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Abort early if no usages or titles in ChangeHandler

https://gerrit.wikimedia.org/r/636970

Change 636478 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove pointless LinkBatch in ChangeHandler

https://gerrit.wikimedia.org/r/636478

Status update: Remove AffectedPagesFinder::filterUpdates() is blocked on open questions that I or someone else need(s) to figure out, but Use TitleFactory more efficiently and Use LinkBatch in AffectedPagesFinder should be ready to merge as far as I’m aware.

Edit: The below change should also be ready, though it’s only partially related (it has little to do with titles and link batches, more with arrays and iterables).

Change 638152 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Use more iterables in AffectedPagesFinder

https://gerrit.wikimedia.org/r/638152

Change 638152 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use more iterables in AffectedPagesFinder

https://gerrit.wikimedia.org/r/638152

Change 636475 abandoned by Lucas Werkmeister (WMDE):
[mediawiki/extensions/Wikibase@master] Remove AffectedPagesFinder::filterUpdates()

Reason:
not worth the effort at this time IMHO

https://gerrit.wikimedia.org/r/636475

Change 636473 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use LinkBatch in AffectedPagesFinder

https://gerrit.wikimedia.org/r/636473

Change 636064 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use TitleFactory more efficiently

https://gerrit.wikimedia.org/r/636064