Check SHA vs Content (was: RE: svn commit: r1759233 - /subversion/trunk/subversion/libsvn_wc/questions.c)
From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 5 Sep 2016 13:46:07 +0200
> -----Original Message-----
We looked at this before, and this change has pro-s and con-s, depending on specific use cases.
With the compare to SHA we only have to read the new file, but we always have to read the file 100%.
With the older system we could bail on the first detected change.
If there is a change somewhere both systems read on average 100% of the filesize... only if there is no actual change except for the timestamp, the new system is less expensive.
If the file happens to be a database file or something similar there is quite commonly a change in the first 'block', when there are changes somewhere later on. (Checksum, change counter, etc.). File formats like sqlite were explicitly designed for this (and other cheap checks), with a change counter at the start.
I don't think we should 'just change behavior' here, if we don't have actual usage numbers for our users. Perhaps we should make this feature configurable... or depending on filesize.
We certainly want the new behavior for non-pristine working copies (on the IDEA list for years), but I'm not sure if we always want this behavior as only option.
This mail is partially, to just discuss this topic on the list, to make sure everybody knows what happened here and why.
Bert
(Note that it is labor day in the USA today... so I don't expect many responses until later this week)
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.