From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Re: Slow redisplay Date: Mon, 26 Aug 2019 06:20:41 +0200 Message-ID: <20190826042041.sb55jznqihn3xcgv@Ergus> References: <20190825103251.osstrlohmzp6bmvr@Ergus> <83k1b1h566.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="206725"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 26 06:21:17 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 1i26VJ-000rf2-2Y for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Aug 2019 06:21:17 +0200 Original-Received: from localhost ([::1]:49646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i26VH-0007Pc-Fz for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Aug 2019 00:21:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45562) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i26Uu-0007PT-Un for help-gnu-emacs@gnu.org; Mon, 26 Aug 2019 00:20:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i26Us-0002Tr-RU for help-gnu-emacs@gnu.org; Mon, 26 Aug 2019 00:20:51 -0400 Original-Received: from sonic314-21.consmr.mail.ir2.yahoo.com ([77.238.177.147]:38231) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i26Us-0002TF-6i for help-gnu-emacs@gnu.org; Mon, 26 Aug 2019 00:20:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1566793248; bh=ulMGGxn4H0CLR4rzpI3gxyL2NkSStWbBtNQCC+SAd8E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=rO+goPRnuP3zDJaM3Tm8LvewHtlQUh5zJp84YqJ6DJZZkR/iX14JzFI0HnDkVtsZ00pCZcTYasabuodlm7lke7OE9GqfudmWwqgUyA5N9bTAlTn6DyAMdbsWhWFXSC/VcrXggMNnJr2zKslP9nrXdHjm/yxhG7BvbDDcfuOoawPWCkJueIJrrIlJxRq9sb3gkjDqK4rdgz2cEMwbwakAsFe5sPIRFt3O5dwBXjw6P6iew6Jf1U1DweHQweweuBEbqXErVoFYrwfBgA3r7wLew7W4rJRcluNlvzDzobnkdtRdTvf//UsDbnDqKeAY4wADRwPM17v9z+GENC4qYRWPuQ== X-YMail-OSG: LO8GD5EVM1nqS693IpQBustgR4abta20ZgfjcxRZLZ06UFR.H5B7X976HWTHdRh 4IFdHAFP7EjyID29f7dXaaxunQgoXuVJu7dJHQnIJ2IcNSO7V417xXeDnt7rzg_B.DscVOTT67gS Ef.8ixORvhXuZljkdPh4CLt0VcoTSu5PGPPF4YEVxG_WHa.pZHOLAEB44GwM6eZoQPPVpmAcHYK6 5DW7ejkFrb0u95PwCZJkOhGpSzMYyZY6jpiSfeDgTU1tsy0SubFtChNsTk1dEixHAMIZq3npHJ0X X4rc.BznE5kjiBiaB.Y_aNJBNsRRdFy7BzfM4tJ7aAI1uSZMF6ad9gM0rmsTitCUTAa3Gg4Nzfma .a19.l_vnG85gduGlzGph8ERXPd7lgwmQfvw3SDCne5IjneOgogZOdbix2._6PnH.YqhramC4gcw PG6pWk7jlyR9Tw1daDAlKoGcCfd8Ll1LVCh0yc.VbDGGHk_gFcMH1lGc3kvE4yTuxb6qr6XrBFgN DTXY1U_ZV5nABNo_3KCWpvAYjO8jHIeIrfHU3fUD6JcT99MImW67tzYJRLCH4GxURnKnfInrZlG5 sgWTtpY4LCtRIeqz7FSDbpuE2yuG9De26GbitegK0GBDmBUwAfUb15MBnlkHSTSZPJoyBcfkcMC5 fxFc5pEKva8rTlTk0kFLkH974fjexHl4N4POD_cB99nL4LNBs_LFmf7z7jPop9EQgNdFEK6Uh_T2 dgHv7coaUx1Ef2IVi4JjGps0Ieo7LiTx7LSXR0tZy543wA_zYZr1J66OMkUY1zXv1SeLp3wFir1b m7jOYZ7mIqwOkt1C8B9X4.YfWO1FItdo4.0IoHjgcU Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Mon, 26 Aug 2019 04:20:48 +0000 Original-Received: by smtp428.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 8f041de6e401408bbd3dbf9d7ffa663f; Mon, 26 Aug 2019 04:20:46 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83k1b1h566.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.177.147 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:121385 Archived-At: On Sun, Aug 25, 2019 at 02:10:09PM +0300, Eli Zaretskii wrote: >> Date: Sun, 25 Aug 2019 12:32:51 +0200 >> From: Ergus >> Cc: Eli Zaretskii , help-gnu-emacs@gnu.org >> >> With the actual master branch I am observing a very important lagging in >> redisplay after being using emacs for 3-4 of hours. The rediplay happens >> like in stop motion speed, I can see the redisplay line being updated >> slowly and it takes sometimes like 1 seconds (from the top to the bottom >> of the screen) in my best laptop. >> >> (I only use emacs in tui) So the only solution after a while is to close >> emacs and reopen again. >> >> I used to have these lines: >> >> (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) >> >> In my config, but after removing them (because someone suggested that >> the redisplay lagging could be related with the gc) the problem is still >> there (less critical, but still there after some hours). >> >> Any suggestion to find where is the issue comming from? Or what should I >> see to make a better report? > >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) ================ When I actually check the variables gc-cons-threshold they are updated properly when minibuffer is active and when not. But it seems that the gc is not triggered because I don't see any gc message after 5 hours and the screen is already lagging.