Last modified: 2014-02-18 13:18:46 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 T62536, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60536 - review default gadgets on wikidata.org for performance improvements
review default gadgets on wikidata.org for performance improvements
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Thiemo Mättig
https://www.wikidata.org/wiki/Special...
backlog
: javascript, need-volunteer, performance
Depends on:
Blocks: 54098
  Show dependency treegraph
 
Reported: 2014-01-28 17:18 UTC by Lydia Pintscher
Modified: 2014-02-18 13:18 UTC (History)
6 users (show)

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


Attachments

Description Lydia Pintscher 2014-01-28 17:18:51 UTC

    
Comment 1 Lydia Pintscher 2014-01-28 17:20:14 UTC
There are a few gadgets enabled by default on Wikidata.org. They should be reviewed for possible performance improvements.
Comment 3 Thiemo Mättig 2014-02-12 18:08:17 UTC
I did a code review of all gadgets that are enabled by default.

[[d:MediaWiki:Gadget-RfDHelper.js]] is executed when viewing [[d:Wikidata:Requests for deletions]] only.

[[d:MediaWiki:Gadget-CommonsMedia.js]] does not do anything on Item pages since media files are already linked to Commons.

[[d:MediaWiki:Gadget-imagelinks.js]] is very well written and very fast.

[[d:MediaWiki:Gadget-Search.js]] is a bit "hacky" but very simple and very fast.

[[d:MediaWiki:Gadget-AuthorityControl.js]] does have a bottleneck (nested loops). On very big Item pages it takes about half a second. I made a change request on the talk page.
Comment 4 Kunal Mehta (Legoktm) 2014-02-12 18:21:53 UTC
(In reply to comment #3)
> [[d:MediaWiki:Gadget-RfDHelper.js]] is executed when viewing
> [[d:Wikidata:Requests for deletions]] only.

I only thought about this when you said that, but the main portion of the script is only executed on [[d:WD:RFD]], however the gadget has a dependency upon 'mediawiki.language', which is loaded on every page even though it isn't used. We can fix that by wrapping the script in a mw.loader.using call, which I'll do today.
Comment 5 Thiemo Mättig 2014-02-13 11:28:13 UTC
(In reply to Kunal Mehta (Legoktm) from comment #4)

I left you a message at [[d:MediaWiki talk:Gadget-RfDHelper.js]].

The bottleneck I found at [[d:MediaWiki:Gadget-AuthorityControl.js]] got fixed. Since there are more nested loops in that script I did some more benchmarking. But all these loops are short (in most cases only 1 iteration). Now the bottleneck is when the anchor elements are added and the page is re-rendered. But this can't be avoided obviously.

I will close this as fixed for now. Please re-open if I should look into other gadgets or new versions of existing ones.

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


Navigation
Links