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 19:42:25 +0300 Message-ID: <83d08gobke.fsf@gnu.org> References: <83o8s0on41.fsf@gnu.org> <83imi8oiyp.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="99215"; 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 18:51:00 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 1jMaOI-000Pef-LL for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 18:50:58 +0200 Original-Received: from localhost ([::1]:52754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMaOG-0004YH-MJ for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 12:50:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58299) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMaGL-00006P-Ag for emacs-devel@gnu.org; Thu, 09 Apr 2020 12:42:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMaGL-0000Vs-6l; Thu, 09 Apr 2020 12:42:45 -0400 Original-Received: from [176.228.60.248] (port=3253 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMaGK-0007g8-DD; Thu, 09 Apr 2020 12:42:45 -0400 In-Reply-To: (message from Dmitrii Korobeinikov on Thu, 9 Apr 2020 20:46:53 +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:246719 Archived-At: > From: Dmitrii Korobeinikov > Date: Thu, 9 Apr 2020 20:46:53 +0600 > Cc: emacs-devel > > > The "right" value depends on your usage patterns, among other > > factors. How to account for that in the default value? > > I am not sure what you mean exactly by usage patterns. Depending on what features and packages you use frequently, your sessions could produce more or less garbage. The optimal threshold should depend on that. > > 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, > > specially if gc-cons-threshold is high. So it isn't entirely "free". > > Maybe it would be possible to garbage collect in chunks and check > after each chunk for input? AFAIU, this will be hard, since Lisp data structures are very recursive. But maybe I'm missing something.