From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Garbage collector: is 800kb a good default? Date: Thu, 09 Apr 2020 22:08:25 +0300 Message-ID: <834ktso4t2.fsf@gnu.org> References: <83h7xsoi03.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="50338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dim1212k@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 09 21:09:21 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMcYC-000CyD-4b for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 21:09:20 +0200 Original-Received: from localhost ([::1]:54330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMcYB-0005Qx-6y for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 15:09:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56391) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMcXf-0004uJ-Sq for emacs-devel@gnu.org; Thu, 09 Apr 2020 15:08:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMcXf-000648-KV; Thu, 09 Apr 2020 15:08:47 -0400 Original-Received: from [176.228.60.248] (port=4310 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMcXe-0003XW-KV; Thu, 09 Apr 2020 15:08:47 -0400 In-Reply-To: (message from Stefan Monnier on Thu, 09 Apr 2020 14:42:56 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246724 Archived-At: > From: Stefan Monnier > Cc: dim1212k@gmail.com, emacs-devel@gnu.org > 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 ();