nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] nano 2.3.3 way slower (w/colorization?)


From: Mike Frysinger
Subject: Re: [Nano-devel] nano 2.3.3 way slower (w/colorization?)
Date: Thu, 19 Jun 2014 17:44 -0400
User-agent: KMail/4.13.1 (Linux/3.14.2; KDE/4.13.1; x86_64; ; )

On Thu 19 Jun 2014 10:26:29 Benno Schulenberg wrote:
> On Mon, Jun 16, 2014, at 20:04, Mike Frysinger wrote:
> > On Mon 16 Jun 2014 11:57:59 Benno Schulenberg wrote:
> > > Nevertheless, 2.3.3 and 2.3.4 should be a bit slower than 2.3.2,
> > > because there is a call to wredrawln() for every screen line (see
> > > svn diff -c 4907), which bypasses the optimization of ncurses, and
> > > two extra calls to wattroff() for every coloured line (see svn diff
> > > -c 4902).  If you undo those two changes, does the speed return to
> > > "normal"?
> > 
> > thanks, that seems to do the trick
> 
> Which one is the actual culprit?  The wredrawln()?  Or the wattroff()s?
> Or only both of them together?

i reverted all three goto's back to continue's.  i can do one at a time if you
think that'll be helpful.
-mike

--- a/src/winio.c
+++ b/src/winio.c
@@ -2603,16 +2603,16 @@
                if (md == -1)
                    fileptr->multidata[tmpcolor->id] = CNONE; /* until we find 
out otherwise */
                else if (md == CNONE)
+                   continue;
-                   goto end_of_loop;
                else if (md == CWHOLELINE) {
                    mvwaddnstr(edit, line, 0, converted, -1);
+                   continue;
-                   goto end_of_loop;
                } else if (md == CBEGINBEFORE) {
                    regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0);
                    paintlen = actual_x(converted, strnlenpt(fileptr->data,
                        endmatch.rm_eo) - start);
                    mvwaddnstr(edit, line, 0, converted, paintlen);
+                   continue;
-                   goto end_of_loop;
                }
 
                while (start_line != NULL && regexec(tmpcolor->start,

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]