emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance degradation from long lines


From: Phil Sainty
Subject: Re: Performance degradation from long lines
Date: Sat, 27 Oct 2018 16:10:11 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]