BlackSpectre Posted June 22, 2023 Posted June 22, 2023 I've created this template: https://homecoming.wiki/wiki/Template:Launchparam It seems to work great using it a few times on small pages. However, using it many, many times in a large page seems to break it. For example, https://homecoming.wiki/wiki/List_of_Command_Line_Parameters . If you scroll to near the bottom you'll see "vis_scale". the "vis_scale (Slash Command)" page exists, and yet the template is acting as if it doesn't exist. I suspect I've hit some sort of limit when using templates, substitutions in templates, or the IfExists parameter. Not sure. The template is a duplicate of the {{slashcommand}} template (which has been used over 600 times without issue in the List of Slash Commands page) except I've added the IfExists parameter. I don't know how to fix this or where to go from here. Any assistance would be greatly appreciated. Black Spectre - A Dark Defender's Home on the Web • The Advanced Bind Guide • The Masters of BAF: A Guide for Leaders and Players • The Wiki List of Slash Commands
AboveTheChemist Posted June 22, 2023 Posted June 22, 2023 (edited) I took a quick peek to see if I noticed anything obvious, but I did not. Granted, the little I learned about templates has mostly evaporated from my brain, so my review skills are of limited use. I did try an experiment in preview mode. I copied {{launchparam|vis_scale}} and pasted it near the top of the doc. In preview mode, it not only worked up top, but it made the two broken vis_scale calls at the bottom work as well. When I deleted the one at the top and refreshed the preview, the two vis_scale calls at the bottom were broken again. I also saw a message in the editing box at the top I had never seen before: Warning: This page contains too many expensive parser function calls. It should have less than 100 calls, there are now 105 calls. This appeared after I copied the template call to the top and previewed that change. When I deleted it and refreshed the preview again, it reported 106 calls. No idea what that means, but it seemed worth reporting. Off the top of my head, I'd say Michiyo, Kai Moon, or Aberrant know or could find the issue, so if you don't hear back from one of them (or someone else that knows), then you might reach out to them. Edited June 22, 2023 by AboveTheChemist typo Popmenus > Badge List | Optimal Paths | Conversion Possibilities | Emotes Wiki Pages > Costume Color Schemes | Set Bonus Comparison Tables Maps > Vidiotmaps | Optimal Paths | Halloween GM Maps | Winter Gift Maps | Offline Map Viewer Sounds > Banshee Sonic Attack Datasets > Recipe Salvage Components | Badge Name & Settitle ID | Exploration Badge & History Plaque Coordinates
City Council Michiyo Posted June 22, 2023 City Council Posted June 22, 2023 (edited) #IfExist is marked as a "Expensive Parser Function Call", there is a hard limit of 100 of these in a page. https://en.wikipedia.org/wiki/Help:Template_limits#Expensive_parser_function_calls Now, I *can* increase this limit, however I've watched the PHP-FPM pool for just the wiki use up 40-50% of the web server's CPU with the current limits in place, so I'm not sure that's a great idea... I could try to raise the limit slightly as a test, but with the understanding that if it spikes CPU usage too much I'll have to drop it back down. Edit to add, this is a 8 core 3.2 GHz CPU, not like a RPi, 40-50% of this CPU is an insane amount, and the wiki has its own dedicated FPM pool. Edited June 22, 2023 by Michiyo
City Council Michiyo Posted June 22, 2023 City Council Posted June 22, 2023 (edited) As a test I bumped $wgExpensiveParserFunctionLimit to 200, and it appears to have solved it. Edited June 22, 2023 by Michiyo
BlackSpectre Posted June 22, 2023 Author Posted June 22, 2023 Thanks guys. Wow. A hard limit. Now I know. M, if it becomes a problem, or if you think it's best, I can use {{bindcommand}} for slash command pages instead and link each command manually one at a time. The IfExists parser function is just more convenient is all. The last thing I want is for it to cause trouble. This group of 105 commands is my first real attempt to grab all the commands that can be used as command line parameters. I'm hoping I have most of them, but the number is likely to increase. Anyway, let me know. And thanks again. Black Spectre - A Dark Defender's Home on the Web • The Advanced Bind Guide • The Masters of BAF: A Guide for Leaders and Players • The Wiki List of Slash Commands
Recommended Posts