vile
[Top][All Lists]
Advanced

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

Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses)


From: Wayne Cuddy
Subject: Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses)
Date: Wed, 21 Sep 2016 15:13:46 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Also... just to reiterate in case it wasn't clear this only happens when
linking with ncursesw not plain ncurses.

Wayne

On Sun, Sep 18, 2016 at 06:33:15PM -0400, Thomas Dickey wrote:
> On Fri, Sep 16, 2016 at 03:48:46PM -0400, Wayne Cuddy wrote:
> > When vile is linked against ncursesw, version 5.9 64-bit in this case, it
> > chews up the CPU when highlighting is enabled.
> > 
> > It's quite reproducible for me:
> > 
> > - start vile on any file which can be highlighted
> > - go into insert mode
> > - make any change to the file (simply moving the cursor does not
> > trigger the problem) but a single character change will
> > 
> > Leaving insert mode does not correct the problem.
> > 
> > It seems to be related to highlighter execution. Turning highlighting
> > off (set nohl) brings the load back down.
> > 
> > Using strace I can see that poll() is being executed with a timeout of
> > 0. According to the man page this causes poll to return immediately so
> > that explains the load.
> 
> Brendan sent me some more information, getting me to look at this chunk:
> 
>       if (acmilli != 0) {
>           timeout(acmilli);
>           for_ever {
>               result = getch();
>               if (result < 0) {
>                   autocolor();
>               } else {
>                   break;
>               }
>           }
>       } else {
>           nodelay(stdscr, FALSE);
>           result = getch();
>       }
> 
> A few months ago, I was working on the timeout code in ncurses - old bug - and
> may not have fixed it completely (but now I know where to look).
> 
> -- 
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net



reply via email to

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