"Hashar" posted a comment on MediaWiki.r104561.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/104561#c26805

Commit summary for MediaWiki.r104561:

parserTest: delay hooks execution to the point we really need them

disabled and filtered out tests were still triggering hooks run. This patch
let us delay hooks running run a little bit until we know we will really need
their execution (i.e. when test is not filtered out and not disabled).

Saving all that unneeded code execution makes running a subset of parser tests
a bit faster when one has many extension enabled.

NOTE: '!!article' sections are still parsed regardless of their usage.
 We would need to add an article/test dependency system to really filter them

Hashar's comment:

The original idea was to parse tests, and build an array of DelayedParserTests. 
Than trigger them all at the end (i.e. foreach( $delayedTests as $test) { 
$test->unleash(); }

I eventually had an issue with the way we forge Articles from the .txt file and 
abandoned the idea. So the code above might look a bit messy.


_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to