Last modified: 2014-03-17 11:35:58 UTC
As of recently, DataUpdate objects are used to represent updates to be performed on the database when a page is changed or deleted (basically, DataUpdate is a generalization of LinksUpdate). Currently, WikiPage::doEdit takes a list of DataUpdate objects from the ParserOutput object and applies them to the database. However, the DataUpdate could be implemented more smartly if the difference between the previous and the new revision could be used,m instead of relying solely on the new revision. So, WikiPage::doEdit should call a function that can generate DataUpdate objects based on the (difference between) the previous and the new revision, and apply them to the database. Conceptually, WikiPage::doEdit should have a way to determine which DataUpdates need to be performed for the current edit, instead of relying on the UpdateObjects from the ParserOutput directly.
An alternative place to implement diff-based updates would be the update of the recentchanges table. Would it be feasible to even do the update to the recentchanges table in the same transaction (list of DataUpdates) as the update to links tables?
Context: this is needed to feed the global/shared change-tracking table for the Wikibase extension that will run the Wikidata project.
[replacing wikidata keyword by adding CC - see bug 56417]