bugGNU nano - Bugs: bug #51084, Nano hangs on very slow computer

 
 

bug #51084: Nano hangs on very slow computer

Submitted by:  Jeremy Hall <jahboater>
Submitted on:  Mon 22 May 2017 11:33:12 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.

 

(Jump to the original submission Jump to the original submission)

Tue 23 May 2017 08:37:44 AM UTC, comment #7:

Thanks for confirming.

(By the way, if you didn't build 2.8.4 with --prefix=/usr, you might want to make sure /usr/local/etc/nanorc is pointing to /etc/nanorc, and that the include statements in that file refer to /usr/local/share/nano/, otherwise you'll have no syntax highlighting or use the old highlighting files.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 23 May 2017 07:44:10 AM UTC, comment #6:

Sorry, read your post after posting mine.

Yes, with 2.2.6 it hung indefinitely (I left it for several hours) after which typing a key showed the text.

2.8.4 is great!

Jeremy Hall <jahboater>
Tue 23 May 2017 07:25:37 AM UTC, comment #5:

Good news ...
I had 2.2.6 installed (the default on the Raspberry Pi/Raspbian/Debian Jessie) (which failed).
I have built and installed 2.8.4 and that works perfectly.

For interest, with 2.2.6, it was something strange about my file, 5*winio.c worked fine as did the last 972 lines of my file replaced with blanks.

Thanks!

Jeremy Hall <jahboater>
Mon 22 May 2017 07:41:52 PM UTC, comment #4:

Okay, I have reproduced the problem with nano-2.2.6 and a C file of 700 thousand lines (on 1.6 GHz Atom). With 350 thousand lines, it takes about five seconds for the text to appear. So with double the amount, one would expect around ten seconds. But it seems to take forever. When typing a key (any key) after around twenty seconds, the text is shown immediately.

The problem is gone since nano-2.6.0. (From 2.3.2 to 2.5.3 the problem got even worse: startup time is around thirty-forty seconds -- and only when typing a key after that amount of time -- instead of the expected ten seconds.)

So, if you upgrade to 2.7.5 (a safe choice) or 2.8.4, you should no longer see the hanging problem.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 22 May 2017 06:18:17 PM UTC, comment #3:

Hello Jeremy,

Which version of nano? If it's not 2.8.4, could you try with that version? And if it's 2.8.4, could you try with 2.2.6?

Does it matter what is in those last 972 lines? Or do blank lines trigger it too? Does it happen with any long c file (for example with src/winio.c concatenated five times)?

If you're using an older version of nano, are you sure that after startup you're not hitting another key? Because that is known to make nano "hang"-- if you then keep typing, nano will finally finish the color precalculation. (I think you're using an old version, because since 2.7.0 or so, nano should say "Reading File" on the statusbar as soon as it opens a file.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 22 May 2017 01:28:10 PM UTC, comment #2:

The complete .c file loads properly if its renamed to remove the .c extension. It must be something to do with the syntax highlighting.

Jeremy Hall <jahboater>
Mon 22 May 2017 12:15:53 PM UTC, comment #1:

This happens with a large .c file over about 14,000 lines.

14000 lines of C opens fine (quickly), but the complete file 14,972 lines hangs indefinitely.

The complete file opens OK on the Pi Zero at stock (1GHz) speed, and on various other computers.

Jeremy Hall <jahboater>
Mon 22 May 2017 11:33:12 AM UTC, original submission:

I was testing stuff on a deliberately slow computer to find "slow" bits of the code when I noticed this. The computer was a Raspberry Pi Zero down clocked to 100Mhz.

On editing a file, nano clears the screen and moves the cursor to the top left and then hangs indefinitely. It bursts into life when a key is pressed.

Other editors work fine with this setup - even emacs!

Jeremy Hall <jahboater>

 

(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 (Posted a comment)
  • -unavailable- added by jahboater (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
    Tue 23 May 2017 08:37:44 AM UTCbensStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 22 May 2017 07:41:52 PM UTCbensAssigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1