Hello,

> What other people have objected is your position that the only way to
> regain them is to manually replace {{SITENAME}} on all messages.

I didn't say "manually" ;-) One could have an automated solution :)

> Parser->transformMsg() could replace many well-known "{{something" and
> only call preprocess if there's still some "{{".
> It probably means refactoring getVariableValue() and some change at
> CoreParserFunctions or mFunctionHooks, to not make it too ugly, but it
> can be done.

I find it remarkable that you want to introduce that much of  
obfuscation for something, what has been resolved for past few years ;-)
Do note, that such code would need to be maintained for all the  
possible cases, would probably fail with certain grammar issues in  
some messages, and, dear oh dear, may not really work with  
internationalized magicwords ;-)
Is that code going to be much faster?

> The parser initialization is also quite expensive, but since the  
> parser
> will end up being used, I think we can omit it.

This is very wrong assumption. Parser is not being used in most  
article pageviews (e.g. article text is parsed on about 7% of requests  
to backend, of course there're quite a few Parser calls by search,  
diffs, etc).

BR,
Domas

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to