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.help Subject: Re: Slow redisplay Date: Mon, 26 Aug 2019 10:42:57 +0300 Message-ID: <83zhjwfk3i.fsf@gnu.org> References: <20190825103251.osstrlohmzp6bmvr@Ergus> <83k1b1h566.fsf@gnu.org> <20190826042041.sb55jznqihn3xcgv@Ergus> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="190024"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 26 09:43:19 2019 Return-path: Envelope-to: geh-help-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 1i29em-000nHB-OO for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Aug 2019 09:43:16 +0200 Original-Received: from localhost ([::1]:50458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i29el-0003RH-BY for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Aug 2019 03:43:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40520) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i29eT-0003R8-EN for help-gnu-emacs@gnu.org; Mon, 26 Aug 2019 03:42:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i29eT-0007On-Ac for help-gnu-emacs@gnu.org; Mon, 26 Aug 2019 03:42:57 -0400 Original-Received: from [176.228.60.248] (port=3598 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i29eS-0004Zj-Qh for help-gnu-emacs@gnu.org; Mon, 26 Aug 2019 03:42:57 -0400 In-reply-to: <20190826042041.sb55jznqihn3xcgv@Ergus> (message from Ergus on Mon, 26 Aug 2019 06:20:41 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121386 Archived-At: > Date: Mon, 26 Aug 2019 06:20:41 +0200 > From: Ergus > Cc: help-gnu-emacs@gnu.org > > >If you set garbage-collection-messages non-nil, do you see any GC > >messages when Emacs is lagging input? > > No there is not any garbage collection message after 5 hours. > > >If so, does invoking "M-x > >garbage-collect RET" manual fix that? > > > Yes, executing it manually fixes the lagging. > > In my config I do. > > early-init.el > ============= > > (setq file-name-handler-alist nil > message-log-max 16384 > gc-cons-threshold most-positive-fixnum ;; Defer Garbage collection > gc-cons-percentage 1.0) > > (add-hook 'window-setup-hook > (lambda () > (setq file-name-handler-alist file-name-handler-alist-old > gc-cons-threshold 800000 > gc-cons-percentage 0.1) > (garbage-collect) > (message "Load time %.06f" (float-time (time-since my/start-time)))) > t) > > init.el > ======= > > (defun my/minibuffer-setup-hook () > (setq gc-cons-threshold most-positive-fixnum)) > > (defun my/minibuffer-exit-hook () > (setq gc-cons-threshold 800000)) > > (add-hook 'minibuffer-setup-hook #'my/minibuffer-setup-hook) > (add-hook 'minibuffer-exit-hook #'my/minibuffer-exit-hook) > > ================ There's currently an unfixed bug on master, whereby you must call garbage-collect explicitly when you reset gc-cons-threshold to a value lower than most-positive-fixnum. Otherwise GC remains disabled basically forever.