[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses)
From: |
Thomas Dickey |
Subject: |
Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses) |
Date: |
Sun, 18 Sep 2016 18:33:15 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
signature.asc
Description: Digital signature
- [vile] load of 1 and 100% CPU (ncursesw vs ncurses), Wayne Cuddy, 2016/09/16
- Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses), Thomas Dickey, 2016/09/16
- Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses),
Thomas Dickey <=
- Re: [vile] load of 1 and 100% CPU (ncursesw vs ncurses), Wayne Cuddy, 2016/09/21
- [vile] print-prefixed-lines-til, Wayne Cuddy, 2016/09/27
- Re: [vile] print-prefixed-lines-til, Wayne Cuddy, 2016/09/27
- Re: [vile] print-prefixed-lines-til, Thomas Dickey, 2016/09/27
- Re: [vile] print-prefixed-lines-til, Wayne Cuddy, 2016/09/27
- Re: [vile] print-prefixed-lines-til, Thomas Dickey, 2016/09/27
- Re: [vile] print-prefixed-lines-til, Wayne Cuddy, 2016/09/28