unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Deric Bytes <dericbytes@gmail.com>
Cc: 69444@debbugs.gnu.org
Subject: bug#69444: 30.0.50; 5 seconds to save file
Date: Wed, 28 Feb 2024 14:03:56 +0200	[thread overview]
Message-ID: <868r34u76b.fsf@gnu.org> (raw)
In-Reply-To: <CAN1Bi_FjRJqeD5w3TC-yOvk6Q8dFvnMvA_EpHy7iv73JOLnFjA@mail.gmail.com> (message from Deric Bytes on Wed, 28 Feb 2024 00:32:10 +0000)

> From: Deric Bytes <dericbytes@gmail.com>
> 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.





  reply	other threads:[~2024-02-28 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28  0:32 bug#69444: 30.0.50; 5 seconds to save file Deric Bytes
2024-02-28 12:03 ` Eli Zaretskii [this message]
     [not found]   ` <CAN1Bi_GrGH3uwacV8BUJeZMLLFKVK5EDyztcyrb+5uwhzxm_FQ@mail.gmail.com>
     [not found]     ` <CAN1Bi_HoNqSnWb-uR-cKxLnE06Xsr7Cu3R3cRsSW67+aoXhXdg@mail.gmail.com>
2024-02-28 15:49       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868r34u76b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69444@debbugs.gnu.org \
    --cc=dericbytes@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).