Author: zigger
Description:
Currently in REL1_4, ParserOptions::newFromUser() is called multiple times.
AFAIK, there only needs to be at most one call for anonymous views, and two for
logged-in views in general. Also $wgMsgParserOptions seems to be misnamed, but
I'm ignoring that as a breaking change to extensions for 1.4.
The patch (to be attached next) optimises this. It also makes greater use of
PHP references for ParserOptions objects, with the exception of EditPage.php.
According to the profiler here, the change speeds up rendering slightly, but YMMV.
Nothing seems broken, but it's not worth doing more rigorous testing unless
there's support for this change.
Subject to feedback, something similar can be done for HEAD. I've done REL1_4
first as it was easier to work against a more stable codebase to see if this
change worked. Also, in HEAD it may be worth reducing the amount of
passing/copying of the ParserOptions object as a clean-up.
Version: 1.4.x
Severity: enhancement