From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Indentation and gc Date: Sat, 11 Mar 2023 08:38:58 +0200 Message-ID: <83sfebyepp.fsf@gnu.org> References: <20230310110747.4hytasakomvdyf7i.ref@Ergus> <20230310110747.4hytasakomvdyf7i@Ergus> <87a60k657y.fsf@web.de> <838rg4zmg9.fsf@gnu.org> <87ttys4dge.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, emacs-devel@gnu.org To: "Dr. Arne Babenhauserheide" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 11 07:40:18 2023 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 1pastt-0009jY-Uu for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Mar 2023 07:40:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pastJ-0002sz-Tn; Sat, 11 Mar 2023 01:39:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1passz-0002qx-Bp for emacs-devel@gnu.org; Sat, 11 Mar 2023 01:39:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1passy-0001lC-Dd; Sat, 11 Mar 2023 01:39:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5qU3qNOVxfc1LS1c/EpbnX4bC0bGfmZaWvQnLr+TPYE=; b=rheaio29fp11 QE87ZF6Y6e1dOnfZ0PytLR49VSUhoNzIZXSrP1mCZvUTzED6sB+uobBBPgkZjF4ZBOm+Zq35rykbK ec1WRk+IIKL73ycAXj18Bq+cY/DgQu0cMS0MT52V9NRtB+m0lMjoWOLjAjx6G1ZEPqLew8QzVYhve 9cnJRCHskhi2oDGHgXzEoWtnFC8rGvMgRSFqpyKs1BKtnbKtu2sB8lm9zt6ldqcwfoagNW688K2FI RTaObDwAw0zbkb0+9WmQd6cBudHRiTbAyOt6tcgXWI5go1dzRD9lNUKrBKBjLn4fek67dKTDrvlj4 e0+HLbULv0cX2u/W/GOvuA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1passr-0007z9-VL; Sat, 11 Mar 2023 01:39:17 -0500 In-Reply-To: <87ttys4dge.fsf@web.de> (arne_bab@web.de) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304274 Archived-At: > From: "Dr. Arne Babenhauserheide" > Cc: spacibba@aol.com, emacs-devel@gnu.org > Date: Fri, 10 Mar 2023 20:23:18 +0100 > > > This can only be done around specific portions of code known in > > advance to be long and GC-intensive. I don't think this kind of > > technique can be used in the situation described by the OP. > > This is at the end: My emacs simply has a ~25x higher gc threshold than > normal and allows more caching of process output. > > That helps a lot with lsp (language servers). The enlarged threshold should be carefully tuned to the user's Emacs usage patterns and to the amount of available virtual memory, to avoid applying too much memory pressure on the system, which could potentially lead to OOM killer doing its gruesome job. So, instead of advising random users to raise the GC threshold to levels that are (perhaps) suitable for your configuration and usage patterns, we should IMO teach them how to tune the threshold to theirs, and leave the setting to them.