From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#13675: Extremely slow redisplay when lines are very long Date: Sat, 21 Oct 2017 00:57:43 +1300 Message-ID: <1d241e49-61bc-089c-ce02-2075a4e98905@orcon.net.nz> References: <83sj545e55.fsf@gnu.org> <23017.21788.768005.940877@eduroam-169-233-201-230.ucsc.edu> <831slye2sx.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1508502794 27377 195.159.176.226 (20 Oct 2017 12:33:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 12:33:14 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 Cc: 13675@debbugs.gnu.org To: Eli Zaretskii , Mark Diekhans Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 20 14:33:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5WTy-0005CT-Ne for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 14:32:58 +0200 Original-Received: from localhost ([::1]:53595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5WU6-0004vA-2Q for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 08:33:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5VxD-0006aY-Uo for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 07:59:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5Vx8-0005Wi-2V for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 07:59:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5Vx7-0005WY-Un for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 07:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e5Vx7-0001U2-KO for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 07:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Oct 2017 11:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13675 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13675-submit@debbugs.gnu.org id=B13675.15085006835621 (code B ref 13675); Fri, 20 Oct 2017 11:59:01 +0000 Original-Received: (at 13675) by debbugs.gnu.org; 20 Oct 2017 11:58:03 +0000 Original-Received: from localhost ([127.0.0.1]:51210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5VwA-0001SN-4j for submit@debbugs.gnu.org; Fri, 20 Oct 2017 07:58:02 -0400 Original-Received: from smtp-4.orcon.net.nz ([60.234.4.59]:53859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5Vw7-0001SA-UA for 13675@debbugs.gnu.org; Fri, 20 Oct 2017 07:58:00 -0400 Original-Received: from [150.107.172.80] (port=27474 helo=[192.168.20.102]) by smtp-4.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1e5Vvs-0006iX-7Z; Sat, 21 Oct 2017 00:57:54 +1300 In-Reply-To: <831slye2sx.fsf@gnu.org> Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- 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: 208.118.235.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:138760 Archived-At: On 20/10/17 19:44, Eli Zaretskii wrote: > What mode/kind of file needs font lock and has such long lines? The common cases I would run into were with 'minified' files of programming code, where as much whitespace as possible has been removed to reduce the file size. e.g. Things like https://code.jquery.com/jquery-git.min.js That kind of file is not intended to be edited by hand, but so far as Emacs is concerned it's just a regular javascript file, and therefore font-lock and all the other modes which would be enabled for editing javascript will be used. > Patches for presenting a warning for such files, like we do with > very large files, are welcome. FWIW I wrote https://savannah.nongnu.org/projects/so-long which tries to avoid performance issues in buffers with unexpectedly long lines by automatically changing the major mode and disabling various minor modes for that buffer (based on a pre-configured list). It can only address certain classes of problem, mind, and it needs some more work (and has been waiting for me to get back to it); but it more or less does what it's intended to do, so others might find it useful as-is (I certainly use it myself). See https://www.emacswiki.org/emacs/SoLong for more information. -Phil