Page MenuHomePhabricator

Migrate all relevant Lua modules from mw.wikibase.getEntity to mw.wikibase.getEntityObject
Closed, ResolvedPublic

Description

mw.wikibase.getEntity needs to go away for performance reasons (among other things). At some point we'll turn it into a simple wrapper around mw.wikibase.getEntityObject, but before we can do that all relevant users have to be migrated.

Modules using it, by number of transclusions: P272

Numbers generated by running:

hoo@terbium:~$ mwgrep --max-results 10000 --module '.getEntity(' > getEntity-Deprecated-2015-01-08.txt
tools.hoo@tools-login:~/tmp$ IFS=$'\n'; for i in `cat getEntity-Deprecated-2015-01-08.txt`; do db=`echo $i | awk '{ print $1 }'`; page=`echo $i | sed 's/.*Module://' | sed 's/\t.*//'`; sql $db "SELECT REPLACE( DATABASE(), '_p', ''), 'Module:$page', COUNT(*) AS No FROM templatelinks WHERE tl_namespace = 828 AND tl_title = '$page'" | tail -n 1 >> getEntity-Deprecated-2015-01-08-links.txt; done
tools.hoo@tools-login:~/tmp$ cat getEntity-Deprecated-2015-01-08-links.txt | sort -k 3,3 -n -r > ~/public_html/getEntity-Deprecated-2015-01-08-links.txt

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenFeatureNone
DuplicateNone
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
OpenNone
StalledNone
OpenNone
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedJarekt
InvalidNone
ResolvedTpt
ResolvedNone
Resolvedhoo
ResolvedLucie
DeclinedNone

Event Timeline

hoo raised the priority of this task from to Needs Triage.
hoo updated the task description. (Show Details)
hoo added a project: Wikidata.
hoo added subscribers: hoo, aude, Lydia_Pintscher.
Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.
hoo renamed this task from Migrate all relevant Lua modules from mw.wikibase.getEntity to mw.wikibase.getEntity to Migrate all relevant Lua modules from mw.wikibase.getEntity to mw.wikibase.getEntityObject.Feb 14 2015, 2:52 PM
hoo set Security to None.

Wohoo! Done! I changed all Modules used more than 10 times. Except for the protected ones. I have a list of the ones I couldn't change, but if @hoo had time and runs his script again to see if I missed out on some, that would be great.

Also, if we could have the Lua Modules somehow globally would be awsome. Easier to maintain and everything. Just saying :)

Also, if we could have the Lua Modules somehow globally would be awsome. Easier to maintain and everything. Just saying :)

You're not the first who asked ;-) T52329

Thank you!

Well, so I got the modules more than 10 times using mw.wikibase.getEntity down to 25. The rest is (mostly) protected, so I couldn't do anything about it. I usually left a comment on the talk page of the modules explaining what to change. I think that's the most I can do and now just hope the rest is done by the people in charge of the modules on the individual Wikipedias. So I will close this bug.