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

 
 

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

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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 24 Feb 2017 10:17:15 AM UTCbensOpen/ClosedOpen=>Closed
    Mon 13 Feb 2017 09:25:28 AM UTCbensStatusNone=>Fixed
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1