Cache revision lookups done by Parser
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 2 Sep 2016 07:30:26 +0000 (00:30 -0700)
committerTim Starling <tstarling@wikimedia.org>
Mon, 5 Sep 2016 02:22:51 +0000 (02:22 +0000)
commitd957cb7347cc03922f116be760f14df8a630fcc9
tree73540c85372b774f131a0ff98fbb652704a3afd5
parentfb962d346e8590f6def677cf9c2de5f0a75b62f0
Cache revision lookups done by Parser

Inverse flame graphs shows revision lookups as one of the
big three queries (Revision, LinkCache, getTitleInfo of
ResourceLoaderWikiModule).

This works via a new Revision::newKnownCurrent() method
needs both page/rev ID from the DB (to avoid invalidation)
and fetches the user name and rev_deleted if needed (again
to avoid invalidation). Parser does not care about fields
anyway in the template path.

Also improved cross-wiki support a bit, and fixed up some
docs and IDEA errors.

Change-Id: Icad602dba5de18c7758b77fd23b0a450ff21d09f
includes/Revision.php
includes/parser/Parser.php