Template talk:Murinae

Substitution
This page had an enormous post-expand size, leading to slow page loads and limiting the number of templates that could be used on pages. Therefore I subst'd many of the templates. Martin  (Smith609 – Talk)  18:01, 9 January 2011 (UTC)

My changes and template performance
Now that Navbox is using the Lua programming language, it seemed to me that there is little point in leaving this template in its present messy form, with all the big Navbox templates "subst"ed out. Among other disadvantages, it makes the template almost uneditable, and precludes any significant future development. The need, back in January 2011, to subst them out was understandable, though: the maximum limit on post-expand is 2,048,000 bytes, and the version before subst-ing takes 1,468,208 bytes (see full performance data below; the actual performance at the time would have been worse, because of using the pre-Lua version of Navbox). Not surprising that something had to be done. The present, fully-"subst"ed version uses only 309,673 bytes.

It is obvious that switching back to standard templates would increase the post-expand size; on the other had, we now have Lua, and the switch to hlist formatting gets rid of all those ugly and costly-en-masse dot-templates, a significant saving.

My first attempt is now in the sandbox. Its post-expand size is 1,079,012 bytes - a lot better than the pre-subst version, but still too high at 53% of the total limit. So I edited it to get rid of Navbox with collapsible groups, which brings it down to 606,565 bytes - still quite high, I think, but acceptable. (Note that you have to exclude the documentation template to get comparable figures). This is now the current version, after my update.

Version of 02:19 12 September 2010 (pre-subst):

Fully-subst-ed version (immediately before my update):

Sandbox version, (using Navbox with collapsible groups)

Current version:

Note that these tests all exclude the documentation template, since it doesn't get transcluded on actual pages.

--NSH002 (talk) 11:58, 29 January 2014 (UTC)

Thoughts on future development
This is a very large navbox, transcluded onto many pages. This is not a good idea!

Instead I suggest that it is split up. Now that the template has been standardised, it will be a fairly easy job for someone to create 10 new navboxes, based on each of the sections here (but check that similar navboxes don't already exist). Then just string them all together in one simple template to replace this one. For an example of how to do this, see London churches.

I also have some thoughts on how the whole set of mammals templates should be organised (borrowing some ideas from the medical templates) and applying appropriate styles. Will post them later on the project talk page when and if I get time to refine them further.

--NSH002 (talk) 11:58, 29 January 2014 (UTC)

More thoughts:

Splitting up and stringing separate templates together is unlikely to solve the include size problem, and in fact may even make it worse. This template should be thought of mostly as a reference, and should be transcluded as a whole at most only on one or two articles, say the main article for the topic, and/or a list article. Transclusions on all the other articles should be replaced by the appropriate sub-template; each of those sub-templates could contain links to this one and to its siblings, probably in the  line. Might be worth extending this idea to the whole project, and making a standard template, or set of templates, to provide these  links. See the medical templates for some ideas. --NSH002 (talk) 12:27, 29 January 2014 (UTC)

Update
As predicted, splitting up and stringing together separate templates did indeed increase the include size (to 920,816 bytes) but this is worth it for the improved manageability and vast reduction in the link overhead.

--NSH002 (talk) 20:44, 29 March 2014 (UTC)