Domas Mituzas wrote:
Anyone, one can see, lion's share is
Parser->preprocess, which doesn't
do any initialization here, pure parser magic (though it probably has
some revisits to magic words and Title code that could be removed).
So yes, parser init adds about 5ms, so does message cache, but then
every message that has {{'s adds up 5ms each - but message cache init
will be much cheaper once new cdb-based code goes live.
Anyway, if anyone still thinks that individual interface messages on
every page should take 5ms each to render, let me know, I can
unsubscribe you from this list myself, you won't have to worry about
that.
Nobody said /that/.
What other people have objected is your position that the only way to
regain them is to manually replace {{SITENAME}} on all messages.
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.
The parser initialization is also quite expensive, but since the parser
will end up being used, I think we can omit it. Otherwise, it could be
moved to a separate parser class.