T243725: HtmlPageLinkRendererBeginHookHandler creates a LanguageFallbackChain when it may not be needed highlights one particular issue.
Along with this being fixed other services should also be checked for similar patterns and fixed where needed.
Documentation should be updated to highlight this pattern to be avoided.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Addshore | T243915 Performance audit of Wikibase/Wikidata, Jan 2020 | |||
Resolved | hoo | T243729 Check Wikibase services for expensive setup patterns (db & api calls etc) & fix / remove |
Event Timeline
I have some ideas about this but xhgui is down :( https://performance.wikimedia.org/xhgui/ I will try later.
I for now leave these here for tomorrow:
- https://performance.wikimedia.org/xhgui/run/view?id=5e30a7403f3dfa0d2bf6b337
- https://performance.wikimedia.org/xhgui/run/view?id=5e30a73a3f3dfa082bc061bc
- https://performance.wikimedia.org/xhgui/run/view?id=5e30a7433f3dfa072b877f14
- https://performance.wikimedia.org/xhgui/run/view?id=5e30a7423f3dfa082b3f437b
So this taks still needs to look for the same pattern of service construction where one of the things injected into the service ends up doing dB calls or API calls (what was happening with the language fallback chain issue).
Less of a profiling thing and more of a looking by eye thing.
Might be able to do something clever actually where a test replaces the db layer and http call later and calls all of the wikibase repo getters, making sure no http or SQL calls are done.
Change 571318 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Assert service getters never access the DB/ do http requests
Change 571318 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Assert service getters never access the DB/ do http requests
Change 571474 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Test that factory methods don't access the DB/ do http requests
Change 571474 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Test that factory methods don't access the DB/ do http requests
We now have fairly conclusive test coverage of this (covers all from-global-state-factory methods I could find), so I think we can consider this done.
Very nice tests for this case :)
We probably also need to do this for the services held withing WikibaseRepo->getWikibaseServices which holds currently another 10 services.
Change 572664 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Make sure WikibaseServices services getters don't access the DB
Change 572664 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Make sure WikibaseServices services getters don't access the DB
Change 690032 had a related patch set uploaded (by Gergő Tisza; author: Kosta Harlan):
[mediawiki/extensions/Wikibase@master] repo: Mock getLazyConnectionRef
Change 690032 merged by Gergő Tisza:
[mediawiki/extensions/Wikibase@master] repo: Mock getLazyConnectionRef
Change 689899 had a related patch set uploaded (by Jforrester; author: Kosta Harlan):
[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.4] repo: Mock getLazyConnectionRef
Change 689900 had a related patch set uploaded (by Jforrester; author: Kosta Harlan):
[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.5] repo: Mock getLazyConnectionRef
Change 689899 abandoned by Gergő Tisza:
[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.4] repo: Mock getLazyConnectionRef
Reason:
needs to be squashed
Change 690045 had a related patch set uploaded (by Gergő Tisza; author: Kosta Harlan):
[mediawiki/extensions/Wikibase@master] Backport CI fixes
Change 689900 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.5] repo: Mock getLazyConnectionRef
Change 690045 merged by Gergő Tisza:
[mediawiki/extensions/Wikibase@master] Backport CI fixes
Change 690066 had a related patch set uploaded (by Gergő Tisza; author: Kosta Harlan):
[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.4] Backport CI fixes
Change 690066 merged by Gergő Tisza:
[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.4] Backport CI fixes
Change 778627 had a related patch set uploaded (by Umherirrender; author: Kosta Harlan):
[mediawiki/extensions/Wikibase@REL1_36] repo: Mock getLazyConnectionRef
Change 778627 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@REL1_36] repo: Mock getLazyConnectionRef