From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Indentation and gc Date: Mon, 13 Mar 2023 12:45:34 +0000 Message-ID: <87a60grf9t.fsf@localhost> References: <20230310110747.4hytasakomvdyf7i.ref@Ergus> <20230310110747.4hytasakomvdyf7i@Ergus> <87a60k657y.fsf@web.de> <838rg4zmg9.fsf@gnu.org> <87ttyrwobj.fsf@localhost> <20230311111730.fatow74xnbel7t3f@Ergus> <83o7ozwju8.fsf@gnu.org> <87jzznwjh3.fsf@localhost> <83jzznwjeh.fsf@gnu.org> <87fsabwirg.fsf@localhost> <83h6urwhu0.fsf@gnu.org> <875yb7wgpd.fsf@localhost> <83bkkzwgcp.fsf@gnu.org> <87y1o3v1fr.fsf@localhost> <838rg3wf7k.fsf@gnu.org> <87v8j7v0a4.fsf@localhost> <835yb7were.fsf@gnu.org> <87r0tvuzpl.fsf@localhost> <834jqrwbgu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37927"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, arne_bab@web.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 13 13:44:45 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 1pbhXg-0009e0-MJ for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Mar 2023 13:44:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbhX9-0004sV-56; Mon, 13 Mar 2023 08:44:11 -0400 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 1pbhX6-0004s9-Vp for emacs-devel@gnu.org; Mon, 13 Mar 2023 08:44:09 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbhX4-0007TQ-PG for emacs-devel@gnu.org; Mon, 13 Mar 2023 08:44:08 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D09002402A6 for ; Mon, 13 Mar 2023 13:44:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678711443; bh=CixRIL0mey4GUYVPwOXsTcSSr5xcmAdn84kG+xz4WIA=; h=From:To:Cc:Subject:Date:From; b=VlQCN9CFEcbpWOcajSsMkeMbEfyekySyjjL3XLEoqhEkkvzWvxqcxAIcz4wD23t3r iYNu/zD4fi1rgXkEFojj1q9SWlBX67XCQDUKZJRkgGLwalOIZMZgD/koPYUc4UFTGT Y51+PGQIetpSLu55UcZcGO7fcAU5vBJS5OD9GKdWja4JaYNDo0xE2zu+mopxz+6BBZ FdZkIoc1WEPJj2vQHbzQ1Lvjcj3OTLp6P7rLDpQfjsfLZEfKCGz3dmwUiq/Rujdiik mruL7vguZC3ExzbIVvXXcxBY0xVEEbQXUGtWn2IG6brhL6a924cm4Gdjc61+HKOC3R Q4o0GF8udu4TQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PZxDM13RYz9rxG; Mon, 13 Mar 2023 13:44:03 +0100 (CET) In-Reply-To: <834jqrwbgu.fsf@gnu.org> Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:304390 Archived-At: Eli Zaretskii writes: >> Well. Currently, the paragraph reads like: we have 800kb default, but do >> not increase it too much because Emacs will require more memory. > > No, it says more. In particular: > > If you specify a larger value, garbage collection will > happen less often. This reduces the amount of time spent garbage > collecting, but increases total memory use. You may want to do > this when running a program that creates lots of Lisp data. > However, we recommend against increasing the threshold for > prolonged periods of time, and advise that you never set it higher > than needed for the program to run in reasonable time. Using > thresholds higher than necessary could potentially cause > system-wide memory pressure, and should therefore be avoided. Unfortunately, if is not very clear how much increasing the threshold affects memory usage. What if I increase the threshold twice? Is it safe? Dangerous? Maybe 10%? 10x? I guess we can give an answer if we collect usage statistics. >> Given that modern computer typically have 4-16Gb RAM, the warning does >> not look like an actual warning. 800kb is nothing. Surely, increasing it >> to 80Mb to even few hundreds Mb is safe, right? Or not? > > Again, you are reasoning about the value as if it were related to the > maximum memory footprint Emacs could have. But in fact, it is related > only to the _increment_ of memory Emacs can have before it should stop > and consider how much of that is garbage. But how else should I interpret "memory pressure"? In practical terms, it looks like increasing the threshold will make Emacs GC less - a good thing if GCs are a problem. But then there is a warning about memory pressure, but it does not look too scary if you have plenty of RAM, especially looking at common advises to increase the threshold across internet. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at