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 15:33:02 +0300 Message-ID: <83o8s0on41.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="129763"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Dmitrii Korobeinikov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 09 14:33:59 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 1jMWNb-000Xet-4i for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 14:33:59 +0200 Original-Received: from localhost ([::1]:48560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMWNa-000755-4u for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 08:33:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50785) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMWN1-0006f7-Mh for emacs-devel@gnu.org; Thu, 09 Apr 2020 08:33:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMWN1-0001Vo-4A; Thu, 09 Apr 2020 08:33:23 -0400 Original-Received: from [176.228.60.248] (port=3743 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMWN0-0006O9-Gq; Thu, 09 Apr 2020 08:33:22 -0400 In-Reply-To: (message from Dmitrii Korobeinikov on Thu, 9 Apr 2020 17:59:04 +0600) 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:246705 Archived-At: > From: Dmitrii Korobeinikov > Date: Thu, 9 Apr 2020 17:59:04 +0600 > > So, as far as I can see, defaulting to a higher threshold with an idle > timer could yield better user experience with practically no > significant tradeoffs. Is there something I might be missing here? Two things: (1) the timer will not run as long as Emacs is running some prolonged calculation, which could produce a lot of garbage; and (2) you seem to ignore the increased memory pressure on the rest of the system from the growing memory footprint of Emacs. On GNU/Linux, Emacs doesn't really return malloc'ed memory to the system, so once the memory footprint grows, it more or less stays that way even after GC. Now, I'm not saying that we cannot or shouldn't increase the default GC threshold, but we must keep these two aspects in mind while discussing this.