emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eager garbage collection


From: Eli Zaretskii
Subject: Re: Eager garbage collection
Date: Mon, 16 Nov 2020 18:34:47 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Mon, 16 Nov 2020 10:07:58 -0500
> Cc: emacs-devel@gnu.org
> 
> This will cause an eager GC right after Emacs goes idle, which can
> happen while the user is actively typing.  I think it would be
> preferable to run this from an idle timer to make sure that we run
> during an actual pause of incoming events.  Your code effectively uses
> an idle-time of 0, and I'm not sure what idle-time we should
> use instead.
> 
> Admittedly, using an idle time of 0 means we start the GC right at the
> beginning of the (potentially short) pause, which also makes it more
> likely that we'll have finished GC before the next event comes in.

Starting GC immediately when Emacs becomes idle will degrade
responsiveness if there's a lot of garbage, because once GC starts, it
runs to completion no matter what.

So maybe this "eager" GC should also be sensitive to the amount of
garbage, in a sense that it should wait more if there's lot of it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]