https://bugzilla.wikimedia.org/show_bug.cgi?id=22701

Robert Rohde <ro...@robertrohde.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro...@robertrohde.com

--- Comment #1 from Robert Rohde <ro...@robertrohde.com> 2010-03-02 22:01:46 
UTC ---
As a performance enhancement, I think this would be pretty negligible in cases
like

{{#if: {{{format|}}} | &#32;({{{format}}}) }} 

however, it might have more merit for cases where {{{format|}}} is replaced on
both sides with something more complicated, like its own nested conditional. 
Ultimately the effect should be easy to benchmark against some of EN's more
complicated code.

I agree that making wiki source more legible may be it's own benefit.  Though
strictly speaking you don't need a parser function for that.  You could simply
define a normal template that translates 

{{wrap | pre | value | suffix}}

into 

{{#if: {{{value|}}} | {{{pre|}}}{{{value}}}{{{suffix|}}} }}

Doing that with a regular template would generate a small performance penalty
in the general case, but again I'm not sure how large that would be even if its
use were extensive.  It is a case where some benchmarks would be helpful.

Off-hand, I'd say the case for implementing something like this as a parser
function is pretty marginal, though I could be convinced otherwise if the
performance impact on things like Citation/core is larger than I expect.  

Ultimately though, I'd say the main path to performance enhancements with
respect to complex templates is to restructure the parser cache so that when a
page is edited we can look at the prior version and bring forward the results
of any template calls that weren't changed.  Re-evaluating every template on
every edit is far slower than things need to be when most of the time very
little of the page has changed.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to