[WikiEN-l] Re: Re: userbox : insanity ?
Phil Boswell
phil.boswell at gmail.com
Wed Jan 11 08:51:06 UTC 2006
"Sam Korn" <smoddy at gmail.com> wrote in message
news:cbffa3750601071337y2067195cr19ec7cb8083c6330 at mail.gmail.com...
On 1/7/06, Bryan Derksen <bryan.derksen at shaw.ca> wrote:
[snip]
> > On the other hand, if it later turns out that a template like this
> > _does_ need changing, it'll be a lot harder to fix everything if it's
> > been substed everywhere.
> I think most shorthand templates should be substituted for another
> reason as well as the technical side (although this is a risk even
> with the best-intentioned admins). Most templates are useful because
> they are fluid -- changes can be made on one page to affect a hundred
> related articles. That is excellent, and a good use of templates.
> However, shorthand templates aren't intended for that. They are
> intended to give a small bit of text quickly. The writer doesn't
> expect their text to change later.
But the provision is there: if at some time there comes a better method for
linking to templates like that, it would be possible to seek out all the
instances of {{tl}} and update them.
Alternatively, if the new solution is that mind-numbingly good, we could
simply take a 10-minute hit on the servers, as when {{if}} was peremptorily
splatted, and business can then proceed as usual.
Premature optimisation is not good, as any good programmer will tell you.
This is why loops are unrolled by compilers, which allow you to write nice
things like "for each I in list; do stuff; next I" and then optimise the
code behind the scenes.
I would assume that novice users, when presented with a choice between
something like "{{tl|some template}}" or "B;B;[[Template:Some
template]]D;D;", would much rather the former, which actually explains
what the fsck it's doing (it's a *t*emplate *l*ink, nudge, nudge), and might
even get some understanding of what this transclusion lark is all about.
If we could persuade a friendly developer to take a look at the transclusion
code, I think there must be huge potential for optimisation. Apparently
there's some cruft in there which treats each different invocation of any
given template as a *totally separate template*. So if you have {{tl|one
template}} and {{tl|another template}}, the code fetches {{tl}} TWICE, which
is fairly daft.
Heck, this is the sort of thing I might be able to take a punt at;
unfortunately my access is through an office firewall and downloading
Mediawiki onto this workstation just wouldn't be politic. With a bit of luck
I should be getting broadband at home some time soon and then I can put my
code where my mouth is.
In the meantime, I would rather that the template-deletionists could simply
take a chill pill and stop causing ForestFires all over the damn place.
</rant style = sorry !>
--
Phil
[[en:User:Phil Boswell]]
More information about the WikiEN-l
mailing list