From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: Performance degradation from long lines Date: Sat, 27 Oct 2018 16:10:11 +1300 Message-ID: <9306f417-e1ea-5e23-5d92-53e3988baacb@orcon.net.nz> References: <665d5f3d84c071632f87f66ffedb6aed@webmail.orcon.net.nz> 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 1540609705 22138 195.159.176.226 (27 Oct 2018 03:08:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2018 03:08:25 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: mithraeum To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 27 05:08:21 2018 Return-path: Envelope-to: ged-emacs-devel@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 1gGExY-0005gw-5C for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2018 05:08:20 +0200 Original-Received: from localhost ([::1]:34916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGEze-00020m-J6 for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2018 23:10:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGEzW-0001xV-9T for emacs-devel@gnu.org; Fri, 26 Oct 2018 23:10:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGEzQ-0004hb-0A for emacs-devel@gnu.org; Fri, 26 Oct 2018 23:10:19 -0400 Original-Received: from smtp-4.orcon.net.nz ([60.234.4.59]:60302) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGEzP-0004hE-L3 for emacs-devel@gnu.org; Fri, 26 Oct 2018 23:10:15 -0400 Original-Received: from [150.107.172.125] (port=6138 helo=[192.168.20.103]) by smtp-4.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1gGEzL-000498-WC; Sat, 27 Oct 2018 16:10:12 +1300 In-Reply-To: Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 60.234.4.59 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230728 Archived-At: On 26/10/18 2:46 PM, mithraeum wrote: > First I tested it on a 268K minified JSON file with 272307 characters > on one line, and it opened in about 3 seconds. > > Then I tried opening the 663K minified JSON file with 671209 > characters on one line. It took a little over 4 minutes to open. We've established the cause of this, off-list. It turned out to be a minor mode `dtrt-indent-mode' https://github.com/jscheid/dtrt-indent Once that was added to `so-long-minor-modes' the test file opened quickly. I'll include my general comments from our discussion: >> It's definitely possible that some minor mode or user option is >> responsible. I'm targeting a handful of things by default, but >> there will unquestionably be others which could/should be added. >> >> I don't think a whitelist of "things which are safe" is at all >> practical, though; so a blacklist of "things to disable" seemed >> like the only practical approach, and therefore it's always >> possible for any given user to be using something which would >> exacerbate the problem, but which so-long doesn't know about. >> >> I was unsure from the outset whether it was appropriate for a GNU >> ELPA package to make explicit reference to packages which were not >> available in core or through GNU ELPA, so I'm already aware of a >> few modes which might potentially make a difference which aren't >> in the default config. These are the additional modes that I >> listed on the Emacs Wiki page when I was originally working on >> this library: >> >> diff-hl-mode >> diff-hl-amend-mode >> diff-hl-flydiff-mode >> hl-sexp-mode >> idle-highlight-mode >> rainbow-delimiters-mode Obviously dtrt-indent-mode can be added to that list. -Phil