[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Garbage collector: is 800kb a good default?
From: |
Eli Zaretskii |
Subject: |
Re: Garbage collector: is 800kb a good default? |
Date: |
Thu, 09 Apr 2020 22:08:25 +0300 |
> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Thu, 09 Apr 2020 14:42:56 -0400
>
> > Let's not forget that running GC while Emacs is idle will make Emacs
> > less responsive if the user starts typing while GC is in progress,
>
> The argument for GC-when-idle goes that if this happens it's not really
> worse than what we have now, because if the GC hadn't started "before
> the user starts typing", it would have run as part of the command
> launched by the user, so from the user's point of view there's no
> noticeable difference.
The difference is that when an idle timer runs a long uninterruptible
calculation, the user thinks Emacs is idle, so having a character
appear, or Emacs respond to a command with a prompt, after a
significant delay makes a very bad UX. By contrast, when a command is
running, the user will normally know that Emacs isn't idle, so a
delayed response will be less of a surprise.
> > Also, we already try running GC each time Emacs becomes idle.
>
> Do we? I thought so as well, but I couldn't see any evidence of it in
> the code.
It's in keyboard.c, right after we auto-save when enough idle time has
passed:
/* If there is still no input available, ask for GC. */
if (!detect_input_pending_run_timers (0))
maybe_gc ();
- Re: Garbage collector: is 800kb a good default?, (continued)
Re: Garbage collector: is 800kb a good default?, Stefan Monnier, 2020/04/09
- Re: Garbage collector: is 800kb a good default?, Dmitrii Korobeinikov, 2020/04/09
- Re: Garbage collector: is 800kb a good default?, Eli Zaretskii, 2020/04/09
- Re: Garbage collector: is 800kb a good default?, Stefan Monnier, 2020/04/09
- Re: Garbage collector: is 800kb a good default?,
Eli Zaretskii <=
- Re: Garbage collector: is 800kb a good default?, Stefan Monnier, 2020/04/09
- Re: Garbage collector: is 800kb a good default?, Eli Zaretskii, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Stefan Monnier, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Eli Zaretskii, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Stefan Monnier, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Stefan Monnier, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Eli Zaretskii, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Andrea Corallo, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Stefan Monnier, 2020/04/10
- Re: Garbage collector: is 800kb a good default?, Andrea Corallo, 2020/04/10