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 02 Nov 2008 04:27:37 PM UTC  
Severity:  3 - Normal Status:  Fixed
Assigned to:  Chris Allegretta <astyanax> 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)

Sat 09 Jan 2016 04:34:09 PM UTC, 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 03 Jun 2015 11:45:22 AM UTC, 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 10 Feb 2010 06:21:45 PM UTC, 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 10 Feb 2010 12:08:18 AM UTC, 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 08 Feb 2010 07:21:25 PM UTC, 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 02 Feb 2010 07:07:45 PM UTC, 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 07 Feb 2009 01:41:19 AM UTC, 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 19 Dec 2008 11:46:15 AM UTC, 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 02 Nov 2008 04:29:35 PM UTC, 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: -email is 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 02 Nov 2008 04:27:37 PM UTC, 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 Files:

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

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

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-01-09 bens StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2015-06-03 bens SummarySyntax Coloring + Slowness since 2.x => syntax coloring + slowness since 2.0.0
    2009-02-07 astyanax StatusNone => In Progress
        Assigned toNone => astyanax
    2008-11-02 dhowett Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3