Try to predict the rev_id when preparing edits
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 19 Jun 2016 05:30:21 +0000 (22:30 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 29 Jun 2016 12:39:33 +0000 (05:39 -0700)
commit005b4d6fffd839e06c33133c60e21d092a21e823
tree53bee0ef502f21031ee8c7d0b7d32e6759c0ef62
parent771d4b49bc9e99cf7f7b28eced8773a2da5f85cd
Try to predict the rev_id when preparing edits

During both the edit stash and first parse in on page save,
guess what the rev_id will be and use that instead of null.
Only reparse if it turns out to be wrong. This avoids extra
parsing on wikis that have low-medium traffic, and does not
cost much. The parsing that can be avoided is:
a) in doEditContent() by using the stash
b) in doEditUpdates() by using the doEditContent() result,
   whether that was able to use the stash or not itself

Also improved the parse operation logging in save paths.

Bug: T137900
Change-Id: Ic6faae70a78b4e223e4d3585cefd482c0fa00677
includes/api/ApiStashEdit.php
includes/page/WikiPage.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php