bugGNU nano - Bugs: bug #24730, syntax coloring + slowness since...


bug #24730: syntax coloring + slowness since 2.0.0

Submitted by:  Dustin Howett <dhowett>
Submitted on:  Sun Nov 2 16:27:37 2008  
Severity: 3 - NormalStatus: Fixed
Assigned to: Chris Allegretta <astyanax>Open/Closed: Closed

Add a New Comment (Rich MarkupRich 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)

Sat Jan 9 16:34:09 2016, comment #9:

I think this has been fully fixed with the recent changes to reset_multis(). If you still experience any sluggishness with 2.5.0 or the upcoming 2.5.1, please open a new bug.

Benno Schulenberg <bens>
Project Administrator
Wed Jun 3 11:45:22 2015, comment #8:

Is there still any perceived slowness with nano 2.2.6 or 2.4.1 or later? If so, please be specific about which syntax you use and which file you are editing. If possible, use one of the src/*.c files from nano itself for testing.

The one little sluggishness that I can notice in src/winio.c is when I hold down <Backspace> on a line that starts with "/*" -- that is: lines that contain the starting sequence of a multiline regex.

Benno Schulenberg <bens>
Project Administrator
Wed Feb 10 18:21:45 2010, comment #7:

Really, I did not observe this at all; then again nano's source files are a few thousand lines each. Can you tell me which syntax you are using to observe this?

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Wed Feb 10 00:08:18 2010, comment #6:

I experience this problem on various systems faster than 1.0GHz (2.0 GHz, 2.8GHz, with varying numbers of cores;) all systems I'm experiencing this sluggishness on have 4GB of RAM (typically 2-3.5GB available when editing.) with the 2.2 series.

Dustin Howett <dhowett>
Mon Feb 8 19:21:25 2010, comment #5:


I did do a fair amount of optimization for the open-ended regexes where just a start and end is specified in the 2.1 series, but it sounds like that's not giving the improvement you are looking for. Honestly I don't have access to any system slower than 1Gz nowadays, so I would have trouble reproducing the behavior you're seeing; can you let me know what kind of specs you are using for your system?

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Tue Feb 2 19:07:45 2010, comment #4:

Is there any progress on this bug? It's still present as of version 2.2.2 (debian squeeze version), and it makes editing large source files a real pain.

From what I've seen, it feels like it's recomputing the syntax regexes for the entire file with every change. this causes input to pile up and get delayed, which is especially nasty on cutting and deleting, because it often keeps going, deleting stuff that I didn't want to.

I tried looking at the the source, but I couldn't find the offending section.

Sat Feb 7 01:41:19 2009, comment #3:

I've been working on this the past week or two, if you are interested in testing out what I have implemented so far and have subversion access let me know. Alternatively if you dont have subversion access but are interested in testing I can create a prerelease tarball for you. Otherwise you should see hopefully see improvement as of 2.1.8 which should be released within a week.

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Fri Dec 19 11:46:15 2008, comment #2:

Just a "me too", I've found nano to be extremely slow with syntax highlighting in general in the 2.x releases. Large files are very slow, it is the same for small files as well however their small size makes it (almost) un-noticable.

Sun Nov 2 16:29:35 2008, comment #1:

nano --version:

GNU nano version 2.1.6 (compiled 01:04:10, Nov 1 2008)
(C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Email: -unavailable- Web: http://www.nano-editor.org/
Compiled options: --disable-justify --disable-wrapping-as-root --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8

Dustin Howett <dhowett>
Sun Nov 2 16:27:37 2008, original submission:

Since nano 2.0.0 was released, using syntax highlighting on large files has been slow. This bug was not present in 1.3.12; now when I edit a few characters on a line or even cut a line in a large C file (for example) the characters disappear very slowly.

Using the C syntax color file shipped with each respective release.
Currently present in nano 2.1.6.

Dustin Howett <dhowett>


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

Attach File(s):

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 astyanax (Posted a comment)
  • -unavailable- added by dhowett (Submitted the item)
  • -unavailable- added by dhowett

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Jan 9 16:34:09 2016bensStatusIn Progress=>Fixed
    Wed Jun 3 11:45:22 2015bensSummarySyntax Coloring + Slowness since 2.x=>syntax coloring + slowness since 2.0.0
    Sat Feb 7 01:41:19 2009astyanaxStatusNone=>In Progress
      Assigned toNone=>astyanax
    Sun Nov 2 16:27:37 2008dhowettCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1