From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37321: 27.0.50; Excessive gc in a use case (el-search) Date: Sat, 14 Sep 2019 11:37:37 +0300 Message-ID: <83blvnz31q.fsf@gnu.org> References: <87lfv1pm5x.fsf@web.de> <874l1mc01w.fsf@web.de> <87woeidd4g.fsf@web.de> <733d0142-51ee-55df-de0c-cca7c989b370@cs.ucla.edu> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="32906"; mail-complaints-to="usenet@blaine.gmane.org" Cc: michael_heerdegen@web.de, 37321@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 14 10:38:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i93ZL-0008R8-AZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Sep 2019 10:38:11 +0200 Original-Received: from localhost ([::1]:49024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i93ZJ-0005Yx-I1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Sep 2019 04:38:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35907) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i93ZD-0005YI-1b for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2019 04:38:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i93ZC-00040x-1D for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2019 04:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i93ZB-00040p-Un for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2019 04:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i93ZB-0000Kh-Pf for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2019 04:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Sep 2019 08:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37321 X-GNU-PR-Package: emacs Original-Received: via spool by 37321-submit@debbugs.gnu.org id=B37321.15684502501229 (code B ref 37321); Sat, 14 Sep 2019 08:38:01 +0000 Original-Received: (at 37321) by debbugs.gnu.org; 14 Sep 2019 08:37:30 +0000 Original-Received: from localhost ([127.0.0.1]:45846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i93Yf-0000Jk-Pa for submit@debbugs.gnu.org; Sat, 14 Sep 2019 04:37:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i93Yc-0000JQ-Bx for 37321@debbugs.gnu.org; Sat, 14 Sep 2019 04:37:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i93YX-0003XN-31; Sat, 14 Sep 2019 04:37:21 -0400 Original-Received: from [176.228.60.248] (port=3251 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i93YW-0000xP-Ig; Sat, 14 Sep 2019 04:37:20 -0400 In-reply-to: <733d0142-51ee-55df-de0c-cca7c989b370@cs.ucla.edu> (message from Paul Eggert on Sat, 14 Sep 2019 01:04:07 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166432 Archived-At: > From: Paul Eggert > Date: Sat, 14 Sep 2019 01:04:07 -0700 > Cc: 37321@debbugs.gnu.org > > (gc-cons-percentage 0.8)) ;Why is binding it here more effective than > binding it more top-level? > > That binding is not effective in general, because it causes Emacs to do most of > its computation with gc-cons-percentage equal to 0.8, but a small amount of it > with gc-cons-percentage equal to 0.1 (the default value). This is in an attempt > to disable most GC. However, the attempt fails in master because when > gc-cons-percentage drops to 0.1 Emacs does a garbage collection pretty much > right away. (In Emacs 26, the code lucks out because Emacs happens to not look > at gc-cons-percentage during the brief time that it is 0.1, so it doesn't GC.) Maybe we should have something in NEWS describing the Lisp-visible effects of the GC changes, perhaps with a couple of practical do's and dont's regarding GC? I'm not sure if you are reading Reddit, but it turns out a lot of Emacs users have GC-related tricks in their init files, and some unbundled packages even do that as part of their operation, like the one in question here. IMNSHO, a large part of this proliferation is based on blind copying from others without really understanding what this does, and it reached epidemic proportions. It might be a good idea to give users who do care some inside information to allow them to tune their GC tricks to these changes -- it could lower the number of bug reports that I'm afraid will follow. Thanks.