Last modified: 2014-11-20 18:49:01 UTC
We load full entities for the onLinkBegin hook handler in Wikibase Repo in order to get a label. e.g. for each item or property on Special:Allpages, we load the entity to get the label. a term lookup, with caching and all, should be used instead. LinkBegin is also used in places like Special:Watchlist (i think), so if someone has a gigantic watchlist, it probably will timeout.
part of the solution to this is to avoid using Linker whenever possible. We are currently using Linker to format property id links in ClaimsView and SnakHtmlGenerator. Instead we should use an EntityIdHtmlLinkFormatter that makes use of an EntityInfoTermLookup / LabelLookup for this.
by not using Linker, we don't encounter this hook.