[Wikia-l] LoopFunctions/Control Structure Functions/Character Escapes Extensions

DanTMan dan_the_man at telus.net
Wed Dec 12 03:05:41 UTC 2007


Didn't know about the issue with #ifexist. But Functionality isn't the 
only thing that I'm considering. If there's any issue on certain ones 
about them being harsher than other ones I'd be happy to also find a way 
to limit them or reduce the amount of load they use.

Since you told me about #ifexist I'll add a limiter onto that one, 
though I notice that it already does have a limit in the latest version 
(Perhaps an integration between the two, so even pre 1.12 wiki will have 
a limit on #ifexist). If it weren't for the fact that Title caches 
titles I'd do that inside the function to.

Some of the functions already consider how much of a load they are. The 
#foreach can be limited with a variable, and because it stops once it 
finds a variable that isn't defined, it doesn't bog down the server just 
trying to do 3 links. The #expr lets you use static variables for or 
interior formula you use a lot in the expression so that they don't need 
to be run as often.
Configuration variables can completely disable functions like #time, 
#rand, etc... which need common re parsing of the page. Or ones which 
use regex, any which tweak with strings, etc... So you only enable what 
you want and need.
Techniques with functions like repetitive #explodes and ifs which wiki 
may use to auto-link things could be replaced with a function which 
simply uses a split, and then drops the individual parts into a pattern. 
(ie: {{#???:string|spliter|pattern}} -> {{#???:A, B, C|,|[[$s$]]}}; 
Though syntax improvement suggestions are open for discussion, just an 
example...)
Escaped functions aren't executed unless un-escaped. So, 
{{#if:{{{1|}}}|<esc>more code</esc>|<esc>some other weighted 
code</esc>}} so that is a method which can lower load (Especially if you 
use it in a case where you're using #ifexist's and you use it to make 
sure that deeper #ifexists aren't used)
But a more sane action for that, would be a new type of #ifexist. Rather 
than hunting down for one title a list of titles could be given, and a 
single db query could be made to match any of them. So you don't need 
multiple #ifexist's and it doesn't load it down. Another type could be 
one which hunts down a title from a list of titles and returns the first 
one it finds. Using a method which doesn't cause a lot of server load.
Using an <esc></esc> instead of {{!}} decreases overhead, and makes 
things more readable and editable.

So, I know that some can be server loading. And complex for many users. 
But I'm not opposed to finding ways to make them more usable for normal 
users, and finding ways to make them softer on the servers than they 
currently are.
This isn't about creating piles of functions, it's about finding better 
ways to use those functions which are easier for communities, and which 
also decrease the load on the servers.

~Daniel Friesen(Dantman) of:
-The Gaiapedia (http://gaia.wikia.com)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
-and Wiki-Tools.com (http://wiki-tools.com)

Angela wrote:
> On Dec 12, 2007 1:04 AM, DanTMan <dan_the_man at telus.net> wrote:
>   
>>  We have various extensions like ParserFunctions, StringFunctions, and DPL
>> already on Wikia for use.
>>     
>
> Please note that complexity for users is not the only problem with
> these. They are really harsh on the servers. The next version of
> MediaWiki introduces limits on things like the number of ifexist calls
> because even Wikimedia's servers can't cope with it. Additionally, we
> have unfortunately had to temporarily disable DPL on some Wikia sites
> due to overuse and interference with caching. We should be looking to
> decrease, not increase, use of these complicated templates and instead
> move towards replicating the functionality in an easy to use way that
> works well for both users and servers.
>
> Angela
> _______________________________________________
> Wikia-l mailing list
> Wikia-l at wikia.com
> http://lists.wikia.com/mailman/listinfo/wikia-l
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikia.com/pipermail/wikia-l/attachments/20071211/ac5096d7/attachment-0004.html 


More information about the Wikia-l mailing list