all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* autosave in the background
@ 2017-07-11  9:38 Sharon Kimble
  2017-07-11  9:58 ` tomas
  2017-07-11 17:46 ` Emanuel Berg
  0 siblings, 2 replies; 3+ messages in thread
From: Sharon Kimble @ 2017-07-11  9:38 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]


Is it possible for emacs to autosave in the background?

I have a file that I'm working on which is 3.3mbs in size, using
org-mode, and whilst I'm writing it *everything*, literally everything,
stops and pauses, becoming unresponsive until its saved completely.
Hence my request.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.9

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: autosave in the background
  2017-07-11  9:38 autosave in the background Sharon Kimble
@ 2017-07-11  9:58 ` tomas
  2017-07-11 17:46 ` Emanuel Berg
  1 sibling, 0 replies; 3+ messages in thread
From: tomas @ 2017-07-11  9:58 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jul 11, 2017 at 10:38:11AM +0100, Sharon Kimble wrote:
> 
> Is it possible for emacs to autosave in the background?
> 
> I have a file that I'm working on which is 3.3mbs in size, using
> org-mode, and whilst I'm writing it *everything*, literally everything,
> stops and pauses, becoming unresponsive until its saved completely.
> Hence my request.

It would make sense first to understand what's going on. Most probably
it isn't "disc" write times. Consider my box, a "netbook" class machine
with a (slow) mechanical disk (and full disk encryption, which means
that disk I/O sends one of both CPUs out fot lunch):

 | tomas@rasputin:~$ time dd if=/dev/zero of=/tmp/foo bs=4096 count=1024
 | 1024+0 records in
 | 1024+0 records out
 | 4194304 bytes (4.2 MB) copied, 0.0192296 s, 218 MB/s
 | 
 | real    0m0.024s
 | user    0m0.004s
 | sys     0m0.016s

That's 4M, so in your case's ballpark.

OK, OK, I cheated: of course the sync to disk is happening in the
background and doesn't count towards the 24 ms above. Now with
sync:

 | tomas@rasputin:~$ time dd if=/dev/zero of=/tmp/foo bs=4096 count=1024 conv=fdatasync
 | 1024+0 records in
 | 1024+0 records out
 | 4194304 bytes (4.2 MB) copied, 0.14341 s, 29.2 MB/s
 | 
 | real    0m0.151s
 | user    0m0.008s
 | sys     0m0.016s

Still "just" 150 ms (and I expect your case to be more the "cheating"
case: I don't think Emacs waits for a sync before coming back).

So there must be something else going on. Perhaps you can profile
a "save file"?

Cheers
- -- tomás

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAllkoVQACgkQBcgs9XrR2kbjmgCdGAU2oRaByN+2oAliK3bfuWGy
9A8AnjRaZz4fqYM0nITIpOTFh+IXcnFV
=8OOb
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: autosave in the background
  2017-07-11  9:38 autosave in the background Sharon Kimble
  2017-07-11  9:58 ` tomas
@ 2017-07-11 17:46 ` Emanuel Berg
  1 sibling, 0 replies; 3+ messages in thread
From: Emanuel Berg @ 2017-07-11 17:46 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble wrote:

> I have a file that I'm working on which is
> 3.3mbs in size, using org-mode, and whilst
> I'm writing it *everything*, literally
> everything, stops and pauses, becoming
> unresponsive until its saved completely.
> Hence my request.

1) It shouldn't take that long to save.
   Try this command:

       $ time head -c 3M < /dev/urandom > file

   On my R-Pi, probably the most stylish but
   admittedly a very slow computer compared to
   most laptops and desktops, on my system this
   take only 0.67s.

2) Don't use files that long! Go to the
   hardware store and ask for a shorter one...

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-11 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-11  9:38 autosave in the background Sharon Kimble
2017-07-11  9:58 ` tomas
2017-07-11 17:46 ` Emanuel Berg

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.