Discuție Modul:EditAtWikidata

Ultimul comentariu: acum 6 ani de Andrei Stroe

Hi @Strainu: and @Andrei Stroe:, In context of phab:T171027 and phab:T151717, Bawolff suggested that we should improve how we track wikidata usage to improve performance. As a power users here, you can improve it with a small trick in Wikidata lua modules - I did something similar in hewiki.

  1. Goal: Get wbc_entity_usage with X aspect to very small number (See hewiki graph from 2/9 to now we got from 200K to 11K today.
  2. How to do it:

ערן (discuție) 12 septembrie 2017 00:15 (EEST)Răspunde

Thanks for the input, ערן. Wow, does this mw.wikibase.getBestStatements thing actually avoid loading the entire item? It's what I was saying just yesterday. I did not know we finally have that. That's great news. We'll get on it. —Andreidiscuție 12 septembrie 2017 10:09 (EEST)Răspunde
Andrei: Currently it still loads the whole entity[1] on the server, but doesn't expose it (so later on wikibase could avoid it without breaking API). It only tracks other usages when accessing claims (e.g other = not sitelinks, and not labels). ערן (discuție) 12 septembrie 2017 13:07 (EEST)Răspunde
@ערן: I see. Still, this is brilliant. We could also use a function that could do the same tracking magic, but return all statements (or at least also statements with normal rank). We still have a few functions that could use this enhancement, but really need to look at claims that may not be of the preferred rank (even when a preferred claim exists). —Andreidiscuție 15 septembrie 2017 13:46 (EEST)Răspunde
Andrei: thank you. I see that following you changes we got down from 1.4M to 0.85M[2] As for a function to load statements of any rank, it looks like there is no one yet, so for now you should keep using getEntity in such cases. Can you please file a task in phab:? You can use phab:T172905 as a template, and please give there an example for use-case. Please also add Hoo to the subscribers, who is the main owner for Lua binding of Wikidata. ערן (discuție) 15 septembrie 2017 14:19 (EEST)Răspunde
With that function now operational, we got it down to 455k and still dropping. —Andreidiscuție 25 octombrie 2017 18:45 (EEST)Răspunde
Înapoi la pagina „EditAtWikidata”.