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 <dic...@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vile mailing list
vile@nongnu.org
https://lists.nongnu.org/mailman/listinfo/vile

Reply via email to