Can anyone think of a reason *not* to eliminate wgParser usage from WikitextContent? I have a bug (T76651) that is resolved by making WikitextContent use its own parser instance rather than wgParser. I wrote an experimental fix of WikitextContent that clones the parser in the same way as MessageCache::getParser and am trying to decide the best way forward.
Thanks, Keith Welter
On 18/12/14 03:40, Keith Welter wrote:
Can anyone think of a reason *not* to eliminate wgParser usage from WikitextContent? I have a bug (T76651) that is resolved by making WikitextContent use its own parser instance rather than wgParser. I wrote an experimental fix of WikitextContent that clones the parser in the same way as MessageCache::getParser and am trying to decide the best way forward.
Parser::firstCallInit() is quite slow, so it makes sense to cache Parser objects persistently. I haven't seen the bug, and phabricator is down right now, but if we really need to recreate parsers, I think we would have to split out Parser::firstCallInit() to a separate, more persistent object.
-- Tim Starling
wikitech-l@lists.wikimedia.org