[00:53:15] Well, there’s this problem: T406784, but I don’t think that applies here 🤷‍♂️ (re @u99of9: What did the comment at the end of the VC about 24 hour caches mean? Are they unaware of nudging methods, or is there some kind ...) [01:50:58] When I run this, there is no way to tell the order of the language labels returned. They seem to be re-sorted by the Wikidata item displaying chip (Daphne ?). But since all implementations of Z30210 are successful, I presume that the order the languages were requested in is the order they come out of David's new selective fetch? [01:50:58] https://www.wikifunctions.org/view/en/Z30120?call=% [01:50:58] 7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z30120%22%2C%22Z30120K1%22%3A%7B%22Z1K1%22%3A%22Z6091%22%2C%22Z6091K1%22%3A%22Q146%22%7D%2C%22Z30120K2%22%3A%5B%22Z6030%22%2C%22Z6033%22%5D%2C%22Z30120K3%22%3A%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z24144%22%2C%22Z24144K1%22%3A%22Z1592%22%2C%22Z24144K2%22%3A%7B%22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%2C%22Z24144K [01:50:58] 3%22%3A%7B% [01:51:00] 22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%7D%2C%22Z30120K4%22%3A%5B%22Z6092%22%5D%7D (re @u99of9: I just saw that David has marked T382921 as resolved - thanks! The resulting Z6820 looks excellent, but I've never used Z883 be...) [02:32:07] However David it looks like the order of properties requested is not preserved: Z30212. This is not quite as important at the moment, but I imagine it is worth fixing in the long run. (re @u99of9: When I run this, there is no way to tell the order of the language labels returned. They seem to be re-sorted by the Wikidata it...) [08:58:17] I think so. You can still use Z24139, (https [08:58:17] //www.wikifunctions.org/view/en/Z24139?call=%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z24139%22%2C%22Z24139K1%22%3A%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z30120%22%2C%22Z30120K1%22%3A%7B%22Z1K1%22%3A%22Z6091%22%2C%22Z6091K1%22%3A%22Q146%22%7D%2C%22Z30120K2%22%3A%5B%22Z6030%22%2C%22Z6033%22%5D%2C%22Z30120K3%22%3A%7B%22Z1K1%22%3A%22 [08:58:18] Z7%22%2C%22Z7K1%22%3A%22Z24144%22%2C%22Z24144K1%22%3A%22Z1113%22%2C%22Z24144K2%22%3A%7B%22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%2C%22Z24144K3%22%3A%7B%22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%7D%2C%22Z30120K4%22%3A%5B%22Z6092%22%5D%7D%2C%22Z24139K2%22%3A%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z24144%22%2C%22Z24144K1%22%3A%22Z1113%22%2C%22Z24144K2%22 [08:58:18] %3A%7B% [08:58:19] 22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%2C%22Z24144K3%22%3A%7B%22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%7D%7D) but I’m not sure that there’s much benefit in specifying the required languages twice, rather than filtering all labels. (https [08:58:19] //www.wikifunctions.org/view/en/Z24139?call=%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z24139%22%2C%22Z24139K1%22%3A%7 [08:58:21] B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z30120%22%2C%22Z30120K1%22%3A%7B%22Z1K1%22%3A%22Z6091%22%2C%22Z6091K1%22%3A%22Q146%22%7D%2C%22Z30120K2%22%3A%5B%22Z6030%22%2C%22Z6033%22%5D%2C%22Z30120K3%22%3A%5B%22Z60%22%5D%2C%22Z30120K4%22%3A%5B%22Z6092%22%5D%7D%2C%22Z24139K2%22%3A%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z24144%22%2C%22Z24144K1%22%3A%22Z1113%22%2C%22Z24144K2%22 [08:58:21] %3A%7B% [08:58:22] 22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%2C%22Z24144K3%22%3A%7B%22Z1K1%22%3A%22Z40%22%2C%22Z40K1%22%3A%22Z41%22%7D%7D%7D) (re @u99of9: When I run this, there is no way to tell the order of the language labels returned. They seem to be re-sorted by the Wikidata it...) [10:31:28] Ah, now @dvd_ccc27919 has shown with Z30214 that Z30119 is not preserving the language order either. This one is important already David . (re @u99of9: When I run this, there is no way to tell the order of the language labels returned. They seem to be re-sorted by the Wikidata it...) [10:33:24] I think I’ve fixed this by changing the argument type to Z1. I’m not sure that we have a way to require it to be a Typed map without also being explicit about the types required for the pairs. (re @dvd_ccc27919: Still this problem is present) [10:36:03] Thanks (re @Al: I think I’ve fixed this by changing the argument type to Z1. I’m not sure that we have a way to require it to be a Typed map wit...) [10:41:46] …or (more accurately) the “key type” (re @Al: I think I’ve fixed this by changing the argument type to Z1. I’m not sure that we have a way to require it to be a Typed map wit...) [11:02:56] I’ve put it in Z30207 for now. It slows it down a bit, but it should work. (re @u99of9: Ah, now @dvd_ccc27919 has shown with Z30214 that Z30119 is not preserving the language order either. This one is important alrea...) [11:21:36] Yes, good for now. I'm still hunting every millisecond (re @Al: I’ve put it in Z30207 for now. It slows it down a bit, but it should work.) [11:53:06] Well, you need to. I’m all out of ideas for now. It makes sense (to me) for it to be done in Z6820. (re @u99of9: Yes, good for now. I'm still hunting every millisecond) [11:57:15] Yep. I'm currently writing that phab ticket. (re @Al: Well, you need to. I’m all out of ideas for now. It makes sense (to me) for it to be done in Z6820.) [12:00:58] T411865 (re @u99of9: Yep. I'm currently writing that phab ticket.) [12:30:05] I’ll comment there… my slight concern is that all genuinely selective fetches would be less efficient. I think it’s a small price worth paying for selection by language, but I’m not convinced of the benefits of statements ordered by property type (which is why there is no explicit ordering in Z28548). (re @u99of9: T411865) [12:44:21] If you are talking about the order in which 'cat, felis catus, hauskatze, kat , etc ' is displayed (or not displayed and visible in the dialog). [12:44:22] The way this is shown is custom made recently in https://phabricator.wikimedia.org/T391130. Sometimes there would be a LOT of items and the lists could get really long. So it now depends per user what order you see, on the page and what in the dialog because: [12:44:24] 1. first it shows in your user language the item if available [12:44:25] 2. then it shows your fallbackLanguages if available [12:44:27] 3. suggested languages (Arabic, English, Spanish, French, Russian, Chinese (Traditional), Chinese (Simplified)) [12:44:28] 4. Rest will be in the dialog. [12:44:30] hope this helps? [12:45:05] I was quoting you not sure that went smoothly😓 (re @u99of9: When I run this, there is no way to tell the order of the language labels returned. They seem to be re-sorted by the Wikidata it...) [12:48:52] Also it is purely for displaying purposes. The api returns: sv, da, nn, de, nb, en, mul [12:51:56] There are two different issues. #1 The phab for David is about the order languages are returned in. #2 The query for you is how do we even know what order they were returned in, when the interface rearranges them? (But we have found other ways to tell what order they were in, so your item is not hugely important to me at the moment.) (re @Daphne: If you are talking [12:51:56] about the orde [12:51:57] r in which 'cat, felis catus, hauskatze, kat , etc ' is displayed (or not displayed and visible...) [12:54:12] In that case the API is correct. But we later found another case where the selective fetch rearranged the order. (re @Daphne: Also it is purely for displaying purposes. The api returns: sv, da, nn, de, nb, en, mul) [13:03:09] Okay! Can you help me by telling what is the reason the order is important here? [13:03:40] Ok that would be good to phab for David indeed (re @u99of9: In that case the API is correct. But we later found another case where the selective fetch rearranged the order.) [13:13:46] When we ask for the label of an item, it may be absent in the ideal language (e.g. en-au). So we actually ask for a list of fallback languages at the same time. They are in order of which one would be the best to fallback to. So when we get the answers, we would like to simply take the first valid answer, rather than try to re-sort them. (re @Daphne: Okay! Can you [13:13:46] help me by tell [13:13:46] ing what is the reason the order is important here?) [13:52:57] I made a statement ordering function. (https [13:52:57] //www.wikifunctions.org/view/en/Z30217?call=%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z30217%22%2C%22Z30217K1%22%3A%5B%22Z6092%22%2C%7B%22Z1K1%22%3A%22Z6092%22%2C%22Z6092K1%22%3A%22P31%22%7D%2C%7B%22Z1K1%22%3A%22Z6092%22%2C%22Z6092K1%22%3A%22P279%22%7D%2C%7B%22Z1K1%22%3A%22Z6092%22%2C%22Z6092K1%22%3A%22P1552%22%7D%5D%2C%22Z30217K2%22% [13:52:57] 3A%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z22220%22%2C%22Z22220K1%22%3A%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z30120%22%2C%22Z30120K1%22%3A%7B%22Z1K1%22%3A%22Z6091%22%2C%22Z6091K1%22%3A%22Q164%22%7D%2C%22Z30120K2%22%3A%5B%22Z6030%22%2C%22Z6036%22%5D%2C%22Z30120K3%22%3A%5B%22Z60%22%5D%2C%22Z30120K4%22%3A%5B%22Z6092%22%2C%7B%22Z1K1%22%3A%22Z6092%22%2C%22Z6092K1%22%3A% [13:52:57] 22P1552 [13:52:58] %22%7D%2C%7B%22Z1K1%22%3A%22Z6092%22%2C%22Z6092K1%22%3A%22P31%22%7D%2C%7B%22Z1K1%22%3A%22Z6092%22%2C%22Z6092K1%22%3A%22P279%22%7D%5D%7D%7D%7D) It certainly pays to be selective. We should think about supporting statement exclusions by property type too. (re @u99of9: T411865) [14:29:51] I've finally been able to make Z30159 work!!!! It can be used for example to make wikitable generation considerably faster, like for example with Z29462. Thanks a lot to Al [14:55:43] Seems to scale nicely with each additional concept 😎👍 (re @dvd_ccc27919: I've finally been able to make Z30159 work!!!! It can be used for example to make wikitable generation considerably faster, like...) [18:58:18] Thanks for raising this and for making the ticket. It was not intended that the result would preserve the requested order of languages or properties. What happens, in the case of properties, is based on the simplest processing – iterating over the statements and retaining the ones with the specified properties. [18:58:19] In the case of language-specific elements, the filtering is done by the Wikidata API, and we just keep the ordering that comes back from there. [18:58:21] I get the reason why the requested order would be nice, but I wonder if there might also be counter arguments favoring the current ordering. That might depend on whether the ordering that comes from Wikidata has some useful significance, or is just random. [18:58:22] One possible consideration: If we make the result respect the requested order of languages and properties, the processing would likely be somewhat less efficient (but maybe not significantly so). [18:58:24] Anyway, let's continue discussing in the ticket. Thanks again! (re @wikilinksbot: T411865 – selective Wikidata fetch Z6820 does not preserve requested order of languages or properties [open]) [19:21:00] Does anyone know how the cpu duration can be longer than the total duration? It doesn't seem to make sense. : https://tools-static.wmflabs.org/bridgebot/22f73d05/file_75881.jpg [19:35:07] You're right; it doesn't make sense. I think this point was made previously here, probably by Cory. The CPU number is of low quality, but the best available number, given architectural and JavaScript constraints, at the time the code was written. There is a ticket for revisiting this; I'll look it up. Also, the issue is flagged on a (still in draft) documentation page(h [19:35:07] ttps:/ [19:35:07] /www.mediawiki.org/wiki/Help:Wikifunctions/Function_call_metadata). Recently the team considered removing the CPU number but decided it's probably still better than nothing. (re @Npriskorn: Does anyone know how the cpu duration can be longer than the total duration? It doesn't seem to make sense.) [19:37:09] *T314953?* (re @David: You're right; it doesn't make sense. I think this point was made previously here, probably by Cory. The CPU number is of low qu...) [19:41:34] It’s not really a duration, more a sum of slices of attention across the system, if that makes sense. (re @Npriskorn: Does anyone know how the cpu duration can be longer than the total duration? It doesn't seem to make sense.) [19:45:33] The most relevant ticket is https://phabricator.wikimedia.org/T314953. It was closed recently, with a brief explanation in the ticket. (re @David: You're right; it doesn't make sense. The CPU number is of low quality, but the best available number, given architectural and J...) [22:33:34] Can you send an example of an API call for multiple specific language labels on a single item? I briefly looked at the REST API documentation and couldn't find it. (re @David: Thanks for raising this and for making the ticket. It was not intended that the result would preserve the requested order of la...) [23:15:09] It would be nice if someone could connect Z30244 to Z6820, David