Subject: Re: bug#28945: 25.2; desktop auto save timer does not work

From: Eli Zaretskii <[email-masked]>
Date: Mon, 23 Oct 2017 22:35:59 +0300

> From: Peter Neidhardt <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 23 Oct 2017 20:28:34 +0100
> 
> 
> > I notice it when I resume typing during the time desktop.el
> > auto-saves.  The response to my typing is "sluggish", because once the
> > timer function starts running, it runs to completion, before Emacs
> > notices I typed something and responds.
> 
> Correct me if I'm wrong:
> 
> - If you keep using Emacs for hours (that is "typing/moving the point
>   around") without taking a 30 sec break, then the timer won't trigger
>   the desktop saving.  Right?

Right.

> - The sluggishness would only be noticed if you happen to do nothing for
>   more than `desktop-auto-save-timeout' but for less than
>   desktop-auto-save-timeout + "time needed for saving".  It seems
>   improbable that this happens _often_.

It happens quite often to me.  Believe it or not, I tend to think a
lot when I type in Emacs ;-)  30 sec is not such a long period for
thinking about your next word or phrase or implementation detail.

> - I've used desktop-mode for years and I've never noticed any
>   sluggishness as it takes less than a fraction of a second to save.
>   I've had crappy computers, but admitedly most of them had an SSD.  My
>   current timeout is 5 and I don't see any performance impact even on a
>   bad computer with an even worse HDD.

How many frames and how many buffers do you typically have in a
session?

> Either way, the default value is not that important since every user is free
> to change the value.  What is more important is to document it
> properly.

No argument here.

> > If you experience any irresponsiveness everytime desktop gets saved,
> > increase the timeout.
> > If not, it's safe to have it around 10.

This kind of advice generally belongs in the manual, not in the doc
string, IMO.