Hey,
I just noticed this commit [0], which gets rid of a pile of direct BasicEntityIdParser usages for performance reasons.
It also addresses a problem which is apparently more widespread than I thought: using an EntityIdParser that only works for Item IDs and Property IDs. Unless you are only dealing with Item IDs or with Property IDs, an EntityIdParser should always be injected. This allows the thing constructing the object graph to add support for all required entity types, and gives extensions to Wikibase Repo (or Wikibase Client) a chance to register new entity types.
Of course this also means that no new code that introduces such occurrences should be allowed through review, even if it contains a "fix this later" TODO (for new code there is no excuse to do it wrong).
[0] https://gerrit.wikimedia.org/r/#/c/167136/
Cheers
-- Jeroen De Dauw - http://www.bn2vs.com Software craftsmanship advocate Evil software architect at Wikimedia Germany ~=[,,_,,]:3
Am 17.10.2014 04:45, schrieb Jeroen De Dauw:
Hey,
I just noticed this commit [0], which gets rid of a pile of direct BasicEntityIdParser usages for performance reasons.
Yay, thanks Katie!
Of course this also means that no new code that introduces such occurrences should be allowed through review, even if it contains a "fix this later" TODO (for new code there is no excuse to do it wrong).
There's no excuse to do it wrong, but there will always be things left to do later. TODOs are a good thing, it's just bad to put them in and forget about them (which I'm quite guilty of, I know).
-- daniel
wikidata-tech@lists.wikimedia.org