emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Don't complain about changed file when it hasn't changed


From: Karl Fogel
Subject: Re: Don't complain about changed file when it hasn't changed
Date: Wed, 07 Sep 2016 11:49:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]