Am 21.09.2017 um 17:18 schrieb Federico Leva:
(Offlist)
Daniel Kinzler, 21/09/2017 17:24:
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.
I trust you, but really? Even when exporting 5000 revisions?
Exporting 5000 revisions is likely to time out due to the time it takes to even
load all the data. If we can load the data, we can probably also hash it in
time. SHA1 is not that slow. Hashing all 1269 PHP files in the includes
directory takes half a second of CPU time on my system (about 2 seconds wall
clock time).
Hashing does put considerable load on the CPU though (on an otherwise I/O bound
operation), so it may cause problems if a lot of people do it. But since we have
a lot more edits than exports, and every edit needs hashing, I don't think thiat
makes much of a difference either.
--
Daniel Kinzler
Principal Platform Engineer
Wikimedia Deutschland
Gesellschaft zur Förderung Freien Wissens e.V.