From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregor Zattler Newsgroups: gmane.emacs.devel Subject: Re: Indentation and gc Date: Sat, 11 Mar 2023 18:10:33 +0100 Message-ID: <87jzzn9pti.fsf@no.lan> 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 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12170"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, arne_bab@web.de, emacs-devel@gnu.org To: Eli Zaretskii , Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 11 18:12:01 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 1pb2lE-0002wd-SO for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Mar 2023 18:12:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb2kW-0006JV-DC; Sat, 11 Mar 2023 12:11:16 -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 1pb2kV-0006JM-Ae for emacs-devel@gnu.org; Sat, 11 Mar 2023 12:11:15 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pb2kT-0000mj-FD; Sat, 11 Mar 2023 12:11:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1678554668; i=telegraph@gmx.net; bh=iqI2sv6duU86k0wVNxQ/NSpve2UkphrDqVzC0BceXvI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=c6t+wIgurIlM9S1S0Y+EyglX6tEqxGGxZ5I5dKZG+/yjwvxJQaAahPEPlCVagnBzy uZjRaHMKQ2Su6jyJb9OxEhF2aS5+DnyANhdvp7FnXBX7WfFesxaTThOxsMcbUSTJ3t XQ4uoe1kFKW7iGDgX7mioSVTzX8X1b8WRPpR2H8NB8cwvYjXYAk+Hx1FxtHlPyYGFF rEgay+QqpwgqRcwbASxSSlmw/71npyA9wPQRN7Qf9egwZdRD2e2b6HPA72U9jE20Qh Jl9l6mVeAHkkgAIJ/DuoKnt+HOv6lJ9oYR4ZcdTDe2R0Fl7IWItb9PlcHu3tqE91XH Lq47f9n4IpmOg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from localhost ([95.90.234.37]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M5wPh-1pe3ge4391-007SDL; Sat, 11 Mar 2023 18:11:08 +0100 In-Reply-To: <834jqrwbgu.fsf@gnu.org> Mail-Followup-To: Eli Zaretskii , Ihor Radchenko , spacibba@aol.com, arne_bab@web.de, emacs-devel@gnu.org X-Provags-ID: V03:K1:Hz21BVr67CO0MGF789TfsfGlB6L2apGmyaovBbTlyJrtFV0Swfn yda1LJCOUjOJxksIk9A7gecBRot+KaTd2OrmyrhD8ozgErvimEAkDSwXF1JzasxX2xaGnNn eW/u/3kfW+Jz+Qm1HaPM5zPH/S7y6Cl8sssmU1Cz5MPDO9ijXSTaXv+f6b2co5VZWg16znL d29VYmvq545wHwHL21seA== UI-OutboundReport: notjunk:1;M01:P0:btuAyaA+nrw=;VZRMBojx38zp0xoP0IDYBAxbTRh Kgu7dWRQfugvRieJmiUg5V66mIMEcTv4oTYxcI3OUes5AwV1ca1jq2Qy7KcnIokVPsqAo+fgg AhiYi+UAtCdXvCjPAQeKeUlW7k3GPcjTW4qv6Ix4SsdoVDgMTxfxpKUpnyqu9qCIWxOW6Ucju 2213DtwEpMHYULr+C96yVp/BiqJCWLW5g5BQcRzTi+RGNBly9IYZLwUVcepG5e+7mJr7TEOM1 88Bi0xtIdKNroKj3XRMKRMadiJ2UBqae0eJfCPVFSkKU05mi7F6e8AHcDAnQ9fa5mLaVObBZL +V8RhoNDlvK1kcHC9lQfv55doSaHQ9qF7uCDpCYH9B6T1HyTMBQoi97cMhi5F64C1aIcaWsil t8UX3FVNvlcYmbVyg5P/rVl58JKtgKTyDaVcQxOXr5+YiFxHGLXnAt5EXx4rL82g9h3rGEop9 vKzDNujQLVw+4FV16lsWOOJv+8VfN7f6pCHis2DzeBak0gp4sH51s9BJ/2uW3Y5B6Eope9VLk r3KVWjP4+Up7I8rwz3akh0pVQ2uNxI2li8Y00w5Wf/7PAUcIbQsAiLiwxrxUwcKh2ViVIDovA VRuEYy3fjtinZNBoNC0MB36X7/LZQIAApAHC5JU3JA/dD4hyqVaNwNhmy9T/Tmqpr4M5McqWE s0jyG4PkQ+pRYDMfss8CVeWDN0fG5wRl0GntbiUCDUukJftWpsLYqDNwHUNBncQ5TpgitlKdd eMjD8I2p8dis7uE7C2PISW6C87saWH0Ga2q1ElHfP/yF7a433latqqUcoNsb+Sk+OfEga/rZ Received-SPF: pass client-ip=212.227.15.19; envelope-from=telegraph@gmx.net; helo=mout.gmx.net X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:304329 Archived-At: Hi Eli, emacs developers, * Eli Zaretskii [2023-03-11; 17:32 +02]: >> From: Ihor Radchenko >> Cc: spacibba@aol.com, arne_bab@web.de, emacs-devel@gnu.org >> Date: Sat, 11 Mar 2023 14:31:18 +0000 >> Given that modern computer typically have 4-16Gb RAM, the warning does >> not look like an actual warning. 800kb is nothing. Surely, increasing i= t >> 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 isn't that the very reason, why Ihors gc-cons-threshold calculation in mid:878rg3wh2f.fsf@localhost is on the save side memory wise? Because it's a fraction of emacs overall memory consumption anyway but scaled regarding the total amount of memory? To me the problem with big gc-cons-threshold even on systems which are even bigger on RAM is that the (rare) garbage collection the takes much more time and an uneducated user might think Emacs hangs. I played a lot recently witch gc-cons-threshold settings due to Emacs being too sluggish with my old ones. Now I: - set gc-cons-threshold very high at the beginning of startup (* 4096 40960) - set it lower at the end of startup (/ (* 4096 4096) 1) - use gcmh with this value - set it very high when entering the mini-buffer and lower again when exiting it - force a gc when frame loses focs The result is that with emacs-uptime being 7 hours, 21 minutes (and plenty of time away from the computer) I have 103 messages regarding Garbage collection with accompanied times for them in my message buffer. Some statistics: Minimal number 0.000 seconds Maximal number 2.603 seconds Sum 65.896 seconds Average 0.63976699029126213592 seconds Median 0.612 seconds Variance 0.06970711075501932322 Standard deviation 0.26402104225803541665 Actually 0.6 seconds are already rather long I think. But it's much better than before (on a ca. 9 years old x240 with 8GB RAM) Therefore I think some auto-adjustment of gc-cons-threshold would be nice, which would try to optimize for low number of garbage collection and short times of actual gc runs. Ciao; Gregor