Go to the first, previous, next, last section, table of contents.


Idle Actions

When a second goes by with no input events arriving, the editor assumes that is has idle time available, and tries to use this period to do non-essential tasks. These tasks include things like garbage collection and auto-saving modified files.

Whenever idle time is detected one of the following tasks is performed. They are listed in order of preference; once one of these has been done Jade will again sleep until an input event is received or another second elapses, whichever happens soonest.

  1. If prefix keys have been entered and are outstanding their names will be printed in the status line. See section Prefix Keys.
  2. If any buffers are ready to be auto-saved (i.e. enough time since their last auto-save has elapsed) one of these buffers will be auto-saved. Only one buffer is ever saved in each idle period. See section Auto-Saving Files.
  3. If the total size of the data objects allocated since the last garbage collection is greater than the value of the idle-gc-threshold variable then the garbage collector is invoked.
    Variable: idle-garbage-threshold
    The number of bytes of Lisp data which must have been allocated since the last garbage collection for the garbage collector to be called in an idle period. It is a good idea to set this variable much lower than the value of the gc-threshold variable since garbage collections happening while Jade is idle should usually be unnoticeable.
    See section Garbage Collection.
  4. If none of the other tasks have been performed the idle-hook hook is dispatched. I'm not sure what this hook could be used for but you never know...


Go to the first, previous, next, last section, table of contents.