Stefan Monnier <address@hidden> writes:
Oh -- remember the "true" size (that is, the
unencrypted/uncompressed/unwhatevered) size of the file at the moment when
it is first visited?
Yes, that's what my FIXME comment was referring to.
Comparing the buffer's size and the file's size would miss too many case
and would be too brittle for my taste (there are many different ways to
modify the data on the way between the file and the buffer).
*nod* Makes sense. The risks here outweigh the potential win, I think.
As long as we're doing that, why not just remember the md5sum of the
original content too?
Cause it'd slow down a common case, compared to this
ask-user-about-supersession-threat which is used very rarely?
Oh, the extra expense of computing the md5sum at initial find-file time?
Hmmm... Fair enough, yeah. I haven't profiled it, and don't think this is
important enough to be worth making those measurements. Let's leave things as
they are.