Subject: Re: bug#69444: 30.0.50; 5 seconds to save file

From: Eli Zaretskii <[email-masked]>
Date: Wed, 28 Feb 2024 14:03:56 +0200

> From: Deric Bytes <[email-masked]>
> Date: Wed, 28 Feb 2024 00:32:10 +0000
> 
> Saving a small file in emacs -q seems to take 1  to 5 seconds.

I sincerely doubt that, see below.  Especially if the file's contents
is plain ASCII, so doesn't need any encoding when saving it.

> I assume this because the 'Rapid Refresh' app I am using takes 1 to 5 seconds to notice 
> the file change when I change it with emacs but 0 seconds when changed with another editor.

You will need to tell us how does Rapid Refresh detect such changes,
because I don't know that.  I also don't know what do "other editors"
do when you save a modified file.  I do know what Emacs does by
default: it renames the original file to the backup file name (so a
file FOO will be renamed to FOO~), and then writes a _new_ file under
the original-file name with the new contents.  So from the filesystem
POV, what happens is that the original file is renamed to a different
name, and then a new file appears under the name of the original file.
The question is: how would Rapid Refresh detect such changes, and what
would be the time frame for that?

If "other editors" overwrite the original file with new contents, the
filesystem could have a very different view of what happens, and thus
the detection by Rapid Refresh could exhibit different timings.