Am 21.09.2017 um 11:24 schrieb Federico Leva (Nemo):
The revision hashes are also supposed to be used by at least some of the import tools for XML dumps. The dumps would be less valuable without some way to check their content.
While this is a typical use cacse for hashes in theory, i have never heard of any MediaWiki related tool actually doing this.
Generating hashes on the fly is surely not an option given exports can also need to happen within the time of a PHP request (Special:Export for instance).
Hashing is a lot faster than loading the content. Since Special:Export needs to load the content anyway, the extra cost of hashing is negligible.
If we only need the hashes in contexts where we also need the full content, generating on the fly should work fine.
But if we need revision hashes in a list of 500 revisions returned from the API, *that* we can't calculate on the fly. Similarly, database queries that need the hashes to detect revisions with the same content can't use on-the-fly hashes.