Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input lag? #118

Closed
s4y opened this issue May 3, 2015 · 3 comments
Closed

Input lag? #118

s4y opened this issue May 3, 2015 · 3 comments

Comments

@s4y
Copy link

s4y commented May 3, 2015

I'm running into a strange problem with pty.js 0.2.7-1 and node v0.12.2: sometimes, input (or possibly output?) gets stuck in a buffer, and doesn't come out until I hit another key. Here's my test case:

var pty = require('pty.js');

var winsize = process.stdout.getWindowSize();

term = pty.spawn(process.env.SHELL || '/bin/sh', [], {
    name: process.env.TERM || 'xterm',
    rows: winsize[1],
    cols: winsize[0]
});

process.stdin.setRawMode(true);
process.stdin.pipe(term);
term.pipe(process.stdout);

In the below gif, I type exit at a slow but regular pace: about two characters a second. But it comes out two characters at a time. Then I hit enter, and the program doesn't exit until I hit enter again several seconds later.

Any idea what's happening here?

@chjj
Copy link
Owner

chjj commented Jul 7, 2015

I'm getting this on only my macbook. Not sure. Will investigate.

@chjj
Copy link
Owner

chjj commented Aug 5, 2015

This problem seems to have disappeared for me. I don't know if it was updates to OSX or what, but it's gone. I can't reproduce it anymore.

@s4y
Copy link
Author

s4y commented Aug 8, 2015

Same. Weird stuff! It still doesn't exit when I run exit until I hit another character, but I bet that's unrelated and/or not a bug.

@s4y s4y closed this as completed Aug 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants