Template talk:Ukroadsmall

Latest comment: 4 years ago by Imzadi1979 in topic Expensive function calls
WikiProject iconHighways: United Kingdom Template‑class
WikiProject iconThis template is within the scope of WikiProject Highways, a collaborative effort to improve the coverage of highways on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on the project's quality scale.
Taskforce icon
This article is supported by the United Kingdom Roads Task Force.

Road marker

It may be possible to replace this template with {{Road marker}} as used at WP:WikiProject Indian roads. That template shares a single image between all signs with the same background, even though the text differs. For the UK, this would reduce the image count from hundreds to about a dozen. Producing a sign for a new road would become a simple matter of writing a short wikitext - no waiting for a new graphic to be uploaded! The example on the right is produced by {{Road marker|UK A2|A 99}} ("2" indicates a background of suitable width for a two-digit number.) The font used is currently Bitstream Vera Sans, which resembles Indian signs, but I'm sure Meta:SVG fonts has public domain fonts more akin to Transport Medium and Motorway for UK use. Suggestions welcome. Certes (talk) 15:48, 30 July 2009 (UTC)

Expensive function calls

Some recent changes at {{Ukroadsmall}} or {{Ukroadsmall-svg}} have probably been responsible for "Lua error: too many expensive function calls" in the following.

I haven't looked, but I guess that the changes introduced a template which tests for the existence of various icons to decide which should be displayed. Unless something clever can be done with the above articles, a fix will be needed. Even on pages which currently show no error, having a lot of expensive function calls can greatly slow down the editing process so serious thought needs to be given to reverting the recent changes. Imzadi1979 and others: Any thoughts? Johnuniq (talk) 07:52, 27 May 2019 (UTC)

Currently, the Lua module does perform a check to see if an SVG graphics exists. If it doesn't, it defaults to the old PNG option. There should be enough of the SVGs in existence now to negate the need for the check. We'll likely discover that some SVGs need to be created, but there's a bot on Commons that could do that expeditiously. Imzadi 1979  13:55, 27 May 2019 (UTC)
And done. Imzadi 1979  14:03, 27 May 2019 (UTC)