[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desktop.el: autosave?
From: |
Juri Linkov |
Subject: |
Re: desktop.el: autosave? |
Date: |
Fri, 07 Dec 2007 02:03:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
>> Saving a buffer's file is fast operation comparing to saving the desktop
>> that takes more time because it is a cpu-intensive task that collects
>> information from all buffers and some possibly long lists and writes
>> to the usually large desktop file. The default timeout for auto-save
>> is 30 sec which is ok for auto-saving normal files, but I don't see a
>> need to waste resources to save the desktop so often.
>
> It's easy to argue about this, but numbers are more convincing. I don't
> know anything about instrumenting functions in Emacs; how can I find out
> how long Emacs spends running desktop-save over a particular time period?
You can evaluate:
(let ((start (float-time))) (desktop-save desktop-dirname) (- (float-time)
start))
that returns a number of seconds spent for desktop saving.
>> But the main problem with idle timers is that with long intervals they
>> may never run.
>
> So don't use long intervals: if the computer is idle anyway, why does it
> matter if Emacs does some work? Or does "idle" only apply to Emacs?
"Idle" applies only to Emacs. And if the user changes nothing in Emacs
during long idle periods it is redundant to write the same desktop file
without changes every 30 sec.
--
Juri Linkov
http://www.jurta.org/emacs/
Re: desktop.el: autosave?, Richard Stallman, 2007/12/04
Re: desktop.el: autosave?, Reuben Thomas, 2007/12/06
- Re: desktop.el: autosave?, tomas, 2007/12/06
- Re: desktop.el: autosave?, Reuben Thomas, 2007/12/06
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/06
- Re: desktop.el: autosave?, Reuben Thomas, 2007/12/06
- Re: desktop.el: autosave?,
Juri Linkov <=
- Re: desktop.el: autosave?, Stefan Monnier, 2007/12/06
- Re: desktop.el: autosave?, Reuben Thomas, 2007/12/09
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/09
- Re: desktop.el: autosave?, Reuben Thomas, 2007/12/09
- RE: desktop.el: autosave?, Drew Adams, 2007/12/09
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/09
- Re: desktop.el: autosave?, Reuben Thomas, 2007/12/09
Re: desktop.el: autosave?, Stefan Monnier, 2007/12/09
Re: desktop.el: autosave?, Reuben Thomas, 2007/12/10
Re: desktop.el: autosave?, Juri Linkov, 2007/12/10