From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pieter van Oostrum Newsgroups: gmane.emacs.bugs Subject: bug#38407: 27.0.50; infinite loop with display of large file without newlines Date: Thu, 28 Nov 2019 19:30:50 +0100 Message-ID: <24032.4698.256238.87458@cochabamba.vanoostrum.org> References: <39c498717f8958e7fdc408d4da51d378@webmail.orcon.net.nz> <24031.28277.201123.531348@cochabamba.vanoostrum.org> <83r21sowx1.fsf@gnu.org> Reply-To: Pieter van Oostrum Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="189753"; mail-complaints-to="usenet@blaine.gmane.org" Cc: psainty@orcon.net.nz, 38407@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 28 20:20: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 1iaPKk-000n6y-VN for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Nov 2019 20:20:11 +0100 Original-Received: from localhost ([::1]:52560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaPKj-0007VY-HR for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Nov 2019 14:20:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50084) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaOZH-0002g9-BK for bug-gnu-emacs@gnu.org; Thu, 28 Nov 2019 13:31:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iaOZE-00055l-0Z for bug-gnu-emacs@gnu.org; Thu, 28 Nov 2019 13:31:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53134) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iaOZD-0004xr-P9 for bug-gnu-emacs@gnu.org; Thu, 28 Nov 2019 13:31:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iaOZB-00009B-KH for bug-gnu-emacs@gnu.org; Thu, 28 Nov 2019 13:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pieter van Oostrum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Nov 2019 18:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38407 X-GNU-PR-Package: emacs Original-Received: via spool by 38407-submit@debbugs.gnu.org id=B38407.1574965859557 (code B ref 38407); Thu, 28 Nov 2019 18:31:01 +0000 Original-Received: (at 38407) by debbugs.gnu.org; 28 Nov 2019 18:30:59 +0000 Original-Received: from localhost ([127.0.0.1]:59107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaOZ8-00008v-Uh for submit@debbugs.gnu.org; Thu, 28 Nov 2019 13:30:59 -0500 Original-Received: from [145.132.212.31] (port=62157 helo=cochabamba.vanoostrum.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaOZ7-00008i-R8 for 38407@debbugs.gnu.org; Thu, 28 Nov 2019 13:30:58 -0500 Original-Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id F2C639FA2B38; Thu, 28 Nov 2019 19:30:50 +0100 (CET) In-Reply-To: <83r21sowx1.fsf@gnu.org> X-Mailer: VM undefined under 27.0.50 (i686-apple-darwin10.0.0) 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:172618 Archived-At: Eli Zaretskii wrote: > > Date: Thu, 28 Nov 2019 07:51:33 +0100 > > From: Pieter van Oostrum > > Cc: 38407@debbugs.gnu.org > > > > Normally I wouldn't open such a bizarre file, but I was doing an 'rgrep' on my home directory, and this was one of the files that came up in the grep results. When I was scrolling though the *grep* buffer, I got this problem. Then I decided to just open the file, to eliminate the possibility that grep-mode was one of the causes. > > > > And yes, I checked it all with emacs -Q. > > As an aside, using Text mode for such files, and visual-line-mode on > top of that, is exactly the opposite of what one should do to make > redisplay performance better. Text mode resets > bidi-paragraph-direction to nil, which makes redisplay work harder > because it needs to find the beginning of the current paragraph each > time redisplay starts. And visual-line-mode makes redisplay a bit > slower, because of the need to find a suitable point to break the > line. > > So I suggest to use the default mode for visiting JSON files. I did open it as .json, and also enabled global-so-long-mode, but still no joy. The real culprit is visual-line-mode, because without it, it can scroll through the file, albeit slowly. But it does finish, whereas with visual-line-mode it keeps swallowing CPU-time, at least for hours. The really bad thing is that it can't be interrupted. ^G does not really stop it. So when you encounter this problem the only way out is to externally abort Emacs, thereby risking to lose your work. And all the hassle to restart and set up what you were doing. As I encounter this problem in real life with rgrep, I can't always avoid it. I am doing a massive cleanup in my home directory, and with rgrep I will occasionally encounter these nasty files. It happened a couple of times in the last weeks. In Emacs 26, it is also slow, but the redisplay comes to an end, so I see this as a kind of regression. The timing with Emacs 26 is very similar to that in Emacs 27, except that it doesn't hang at the end. So my impression is that the real difference is when the scrolling reaches the end of the file. That also happens with M-> (end-of-buffer), which hangs indefinitely (or at least a long time that is virtually indistinguishable from indefinitely) in Emacs 27, but it does finish in Emacs 26. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4]