Content deleted Content added
m Archiving 1 discussion(s) from Template talk:WPBannerMeta) (bot |
m Archiving 1 discussion(s) from Template talk:WPBannerMeta) (bot |
||
Line 83:
:This is a correct report of a bug in the code, which I have now fixed in the sandbox. Thanks — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:07, 11 July 2023 (UTC)
::<small>Thanks for undeleting my message. I had fixed this instance with a hammer instead of a screwdriver. Your way is better. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 11:19, 12 July 2023 (UTC)</small>
== Too many expensive function calls ==
Now that we support an indefinite number of task forces, the category checks on /templatepage are getting too expensive. For example see [[Template:WikiProject Caribbean/sandbox]] which has 28 task forces, each one checking for 12 quality and 7 importance categories. It is easy to see how the limit of 500 is passed. We could limit the category checks to the first 10 task forces, or perhaps we could be clever and check a random selection of 10 task forces. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:08, 12 July 2023 (UTC)
:What differs from the status quo and this? The maximum number of taskforces might be infinite, but the number actually in use remains the same. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 22:25, 12 July 2023 (UTC)
::Before the module we could only check categories for 5 task forces, but now it's trying to check for all of them. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:27, 12 July 2023 (UTC)
:::Oh, I see. These things might actually be more suited to a bot Database Report if expensive calls are causing issues. But until such time your solution also works. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 22:32, 12 July 2023 (UTC)
::::Maybe just keep a count of how many checks and don't check once close to 500 and add another note below the banner on the template page saying not all category existance has been checked? -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:40, 12 July 2023 (UTC)
:::::That's not a bad idea. I've limited the check to tf1-10 for the moment until we figure this out properly. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:45, 12 July 2023 (UTC)
:::::Random idea coded and the result can be seen on [[Template:WikiProject Caribbean/sandbox]]. An advantage is that a different set of categories are checked each time the page is loaded, rather than the same ones each time. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 23:10, 12 July 2023 (UTC)
::::::I'm not sure that's an advantage; if I understand correctly, it means the page's quality and importance ratings can change randomly from load to load. I think that would be a more confusing reader experience. [[User:Isaacl|isaacl]] ([[User talk:Isaacl|talk]]) 00:58, 13 July 2023 (UTC)
:::::::May be we can use a way where the category check is chosen by UTC date. On 1st, the first 5 tf are checked, on 2nd, the next five, and so on until looping back? The template code should have instructions about the same. Maybe also add a debug=yes mode for those trying to debug the template irrespective of the date. It should not be part of the permanent template code though. If possible a preview-only effect would be appreciated. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 05:02, 13 July 2023 (UTC)
::::::::I still think that would be confusing for readers. [[User:Isaacl|isaacl]] ([[User talk:Isaacl|talk]]) 06:35, 13 July 2023 (UTC)
:::::::::There is nothing we are discussing which would affect readers. These are about some warnings that appear on the template page if certain required categories do not exist. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 07:08, 13 July 2023 (UTC)
::::::::::I apologize for misunderstanding. Personally, I still am not a fan of non-deterministic behaviour; perhaps the page can be placed in a tracking category that can be used by a bot or user script to perform full validation. [[User:Isaacl|isaacl]] ([[User talk:Isaacl|talk]]) 16:22, 13 July 2023 (UTC)
:::::::::::Bot idea is preferable, but that would need a bot operator willinf to take up this recurring task. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 16:30, 13 July 2023 (UTC)
::::::::::::I agree with both points; I suggested a user script as an option if no one volunteers to run a bot. [[User:Isaacl|isaacl]] ([[User talk:Isaacl|talk]]) 16:35, 13 July 2023 (UTC)
::::::::::::Let's ask at [[WP:BOTREQ]] and see if anyone takes it up. Here is my draft message. Feel free to modify it in any way that makes the message concise, clearer, and correct.
:::::::::::::"For every WikiProject banner, {{tl|WPBannerMeta}} detects whether the quality/assessment categories required for its taskforces are created or not, and creates a warning and also populates [[:Category:WikiProject banners with formatting errors]]. Until recently, this template check was limited to the first 5 taskforces. But several banners already use more than 5 taskforces. Recently, the banners were switched to module, it is able to run a category check on any number of taskforces, but leads to too many expensive function calls. Thus, a bot that runs regularly to generate a report of category checks is required. The relevant code is already available in wikitext/Lua format. Thanks!"
::::::::::::<span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 18:32, 13 July 2023 (UTC)
::::::::Daily changes sounds good - do you want to code that? Not sure how your debug option would work, but feel free to sandbox that as well — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 12:21, 13 July 2023 (UTC)
|