On 04/12/12 09:01, Merlijn van Deen wrote:
> In the original LST implementation, this was not a problem: just the
> transcluded sections were rendered, so overall, 'Pagina principale/Sezioni'
> was only parsed once - but in a eight seperate pieces. However, in the *
> current* situation, the whole of 'Pagina principale/Sezioni' is rendered
> for *every* transclusion, which means that the parsing times goes up by a
> factor of 8. To make matters worse, this structure is also used further
> down the template tree, which means the overall parsing time goes up to ~
> 30s, the parser's limit. (the current parsing time is ~2s).
Judging by the itwikisource jobs I just killed on most of the job
runners, the parse time went up by a factor of infinity, not a factor
of 8. They had been running for 3.5 days with --maxtime=300.
> However, it was not possible to do something like:
>
> page O: ===<section start='header'>{{{1}}}</section end='header'>===
> page P: {{O|Some header text}}
> page Q: {{#lst:P|header}}
So don't do that. I find it hard to believe that allowing such a
feature will be an amazing win for the wiki's usability.
> In the new situation, the #lst mechanism does something like:
> 1) get expanded wikitext using
> $parser->preprocess("{{:page_to_be_transcluded}}")
> 2) get the DOM by calling $parser->preprocessToDom() on the expanded
> wikitext
> 3) traverse this DOM, find section tags, and call
> $parser->replaceVariables(....)
> on the relevant sections (unchanged)
Double-parsing will break the syntax, {{!}} etc. will not work.
-- Tim Starling
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l