Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:User/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This module implements {{tl|user}}. For documentation, please see the [[Template:User|template page]]. === Technical details === While the {{tl|user}} template is only a wrapper for [[Module:UserLinks]], by implementing it as a Lua module we make significant gains in performance. It is roughly twice as fast as accessing Module:UserLinks from wikitext. For example, this module rendered a test page containing nothing but 1000 {{tl|user}} transclusions in 3.9 seconds, whereas the version that called Module:UserLinks from wikitext rendered it in 7.7 seconds. The performance gains are achieved by reducing the number of parameters that are looked up from wikitext. In particular, the link codes, "t" and "c", along with the "span=no" option, are passed directly to UserLinks. Also, UserLinks looks up the arguments "user", "User", "project", "Project", "lang", and "Lang". From wikitext, each parameter is checked twice β once for the #invoke text and once for the calling template β and each check is relatively resource-heavy. From Lua, each parameter is only checked once, and the individual checks take much less time. This means that on average, maybe nine argument lookups are saved in each invocation by using this module. On pages with hundreds or thousands of invocations, this adds up to a lot of argument lookups saved. <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| <!-- Categories go here and interwikis go in Wikidata. --> }}</includeonly>
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Tl
(
edit
)