The one piece left over from T296023 is to get ParserOutput to use a LinkBatch of some sort so that the conversion from Title dbkey to page id is efficient and doesn't kill performance.
Probably what we want to do is change the representation of the mLinks array, and convert to page id in a batch during includes/deferred/LinksUpdate/PageLinksTable (and in the deprecated ParserOutput::getLinks() method, left for back-compat) instead of synchronously during the parse.
This is also relevant to ParserOutput::addTemplate(), which currently non-optionally takes a page id.