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 14:37:36 +0200 Message-ID: <83mt4jwjjj.fsf@gnu.org> References: <20230310110747.4hytasakomvdyf7i.ref@Ergus> <20230310110747.4hytasakomvdyf7i@Ergus> <87a60k657y.fsf@web.de> <838rg4zmg9.fsf@gnu.org> <87ttyrwobj.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23053"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arne_bab@web.de, spacibba@aol.com, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 11 13:38:26 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 1payUU-0005nz-Fr for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Mar 2023 13:38:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1payTy-0006nk-Ab; Sat, 11 Mar 2023 07:37:54 -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 1payTw-0006nI-UX for emacs-devel@gnu.org; Sat, 11 Mar 2023 07:37:52 -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 1payTw-0004yI-KM; Sat, 11 Mar 2023 07:37:52 -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=Upg2vvywYRnKHSVy+DV8IfSfhiTLx9h5Xr/miTs3wRw=; b=qunvEundinbk em//a0jlq/WZw7bPlFtfXE3oDCVWDUwSxMdAqUqiIjl1Wzgd11ZWnJKV+l1oHZ50z+dM/KCEG68m2 6A90B1G5h9FbXGr87AcBBqtTdyMNTYKwm6PMF3CijW1My+gpJ/26dYMoH81oq0cMLGaNJXqaNIOrc tNofBvPEsa6gU+ZvuYVR1fTKEtp0ug1WNQUDGdlU7s20lgfG28SI6BjCaPN1FokftIpkmJuhFRR4c PGP+lAGvjJjG1EvnYanjOlY4ICTIi79tXvTGlKHjl3QrldRe8H7w4RyOpuIv6K/LyVcVryeK2ofQA 3z+Kc4uJ3WBi3rSYri/5OA==; 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 1payTv-0005lA-W9; Sat, 11 Mar 2023 07:37:52 -0500 In-Reply-To: <87ttyrwobj.fsf@localhost> (message from Ihor Radchenko on Sat, 11 Mar 2023 10:54:24 +0000) 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:304297 Archived-At: > From: Ihor Radchenko > Cc: "Dr. Arne Babenhauserheide" , spacibba@aol.com, > emacs-devel@gnu.org > Date: Sat, 11 Mar 2023 10:54:24 +0000 > > Eli Zaretskii writes: > > >> ;; Make gc pauses faster by decreasing the threshold again (from the increased initial). > >> (setq gc-cons-threshold (* 20 1024 1024)) > >> ;; original value: 800 000 > >> > >> ;; speed up reading from external processes > >> (setq read-process-output-max (* 1024 1024)) ;; 1mb > > > > 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. > > May it be done when loading init.el and early-init.el? See my response, where I explain that it is not easy, AFAIU. > As for "known in advance", may Emacs keep track of how many GCs are > triggered by user commands and then adjust GC dynamically? Adjust how? If you mean enlarge under some conditions, then please tell: . what are those conditions? . should the threshold also go down under some other conditions, and if so, how? . how to determine the ceiling for increasing the threshold?