Last modified: 2014-10-15 13:27:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46344, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44344 - Loading site links needs optimization
Loading site links needs optimization
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataClient (Other open bugs)
master
All All
: Low minor (vote)
: ---
Assigned To: Wikidata bugs
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-25 14:50 UTC by Aude
Modified: 2014-10-15 13:27 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aude 2013-01-25 14:50:03 UTC
When the sites data cache is reset, it is super slow to load the site links.  The code for adding the interwiki language links could use optimization in this case, and optimizations may also be helpful for when sites data comes from memcached.

I have this test wiki on external hosted VM which is reasonably fast most of the time for most stuff, but not this.

My profiling without stuff in memcached:

Wikibase\ClientHooks::onParserAfterParse
76.56%	7.02%	4	0.36	11606.12	860.34	4220.41	312.85
Wikibase\LangLinkHandler::addLinksFromRepository
76.55%	6.41%	1	0.09	46416.9	3144.88	4219.72	285.9
SiteSQLStore::getSite [+]
76.41%	40.07%	11	1	4211.72	1786.12	4211.72	1786.12
SiteSQLStore::loadSites
76.23%	40.04%	7	0.64	6602.97	2804.92	4201.89	1784.95
Wikibase\LangLinkHandler::getEffectiveRepoLinks
69.68%	0.63%	1	0.09	42252.8	307.8	3841.16	27.98
Wikibase\LangLinkHandler::getEntityLinks
69.68%	0.67%	1	0.09	42251	329.06	3841	29.91
SiteSQLStore::siteFromRow
15.62%	16.1%	5495	499.55	1.72	1.44	860.76	717.85

With memcached:

Wikibase\ClientHooks::onParserAfterParse
61.84%	3.93%	6	0.29	7929.48	573.7	2265.57	163.91
Wikibase\LangLinkHandler::addLinksFromRepository
61.83%	3.59%	1	0.05	47566.8	3145.11	2265.09	149.77
SiteSQLStore::getSite [+]
61.71%	22.41%	11	0.52	4315.88	1786.15	2260.7	935.6
SiteSQLStore::loadSites
61.56%	22.4%	7	0.33	6765.61	2804.95	2255.2	934.98
Wikibase\LangLinkHandler::getEffectiveRepoLinks
55.27%	0.35%	1	0.05	42524.4	307.99	2024.97	14.67
Wikibase\LangLinkHandler::getEntityLinks
55.27%	0.38%	1	0.05	42521.7	329.25	2024.84	15.68
Setup.php [+]
15.66%	23.76%	21	1	573.57	992.03	573.57	992.03
SiteSQLStore::siteFromRow
12.72%	9.01%	5495	261.67	1.78	1.44	465.88	376.01


Things seemed to be faster before the latest sites code changes, although I think optimizations were needed anyway and needed even more now.
Comment 1 Aude 2013-01-25 17:06:29 UTC
Here is with memcached: (i apparently disabled it above ^)

Wikibase\ClientHooks::onParserAfterParse
12.29%	7.1%	4	0.36	768.13	778.27	279.32	283.01
Wikibase\LangLinkHandler::addLinksFromRepository
12.26%	6.43%	1	0.09	3065.81	2817.9	278.71	256.17
MWMemcached::get
12.07%	43.81%	44	4	68.6	436.36	274.42	1745.45
SiteSQLStore::getSite [+]
11.96%	43.69%	11	1	271.78	1740.84	271.78	1740.84
Wikibase\LangLinkHandler::getEffectiveRepoLinks
10.56%	0.2%	1	0.09	2641.4	87.04	240.13	7.91
Wikibase\LangLinkHandler::getEntityLinks
10.56%	0.25%	1	0.09	2640.36	107.81	240.03	9.8

This is *much* better but still has plenty room for improvement

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links