bugGNU nano - Bugs: bug #48386, typing Enter is slow in a large...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48386: typing Enter is slow in a large file -- when using highlighting with multiline rules

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 03 Jul 2016 10:48:44 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Mon 13 Feb 2017 09:25:28 AM UTC, comment #1: 

Fixed in git, b3bcc8ee, as a consequence of stopping to reset the multidata.  Great.

Benno Schulenberg <bens>
Group administrator
Sun 03 Jul 2016 10:48:44 AM UTC, original submission:  

To reproduce, run 'for x in $(seq 66); do cat NEWS >>hundredthousand.c; done'.  Now run 'src/nano hundredthousand.c' and type: M-G -11 <Enter>.

Type some characters -- nano responds instantly.  Delete some characters -- nano is quick.  Delete even a newline -- it happens immediately.  Now press Enter...  One... two... three... four!  Here it takes four seconds before nano creates the new line.

Why?  What is happening there?  And why doesn't it happen for a line join?

When I make reset_multis() into a no-op, things hugely improve.  There is still a slight delay of about a quarter second upon pressing Enter, but for such a big file that is kind of acceptable.  The thing is: for Python files this delay already becomes noticeable and irritating when you're near the end of a file of just five hundred lines.

But still: what multis need to be reset upon an Enter that don't need to be reset upon a line join?  Sure, an Enter can break a regex match, but so could a Join (although it is more likely to create a match), so the resetting overhead should be the same.  Where are they different?

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-24 bens Open/ClosedOpen Closed
    2017-02-13 bens StatusNone Fixed
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code