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

pty: immediately render after a period of inactivity #798

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

Gnurou
Copy link
Contributor

@Gnurou Gnurou commented Oct 22, 2021

The current code waits for 30ms after reading new data to refresh the
screen in order to batch input together. This reduces the number of
refreshes, but also adds perceptible latency as keystrokes will only get
visual feedback after a 30 ms delay.

Improve this by immediately refreshing if more than 30ms have already
passed since the last refresh. That way punctual events like keystrokes
get immediate feedback, while heavier input still gets batched together.

The current code waits for 30ms after reading new data to refresh the
screen in order to batch input together. This reduces the number of
refreshes, but also adds perceptible latency as keystrokes will only get
visual feedback after a 30 ms delay.

Improve this by immediately refreshing if more than 30ms have already
passed since the last refresh. That way punctual events like keystrokes
get immediate feedback, while heavier input still gets batched together.
@imsnif
Copy link
Member

imsnif commented Oct 22, 2021

Hey @Gnurou - I'm very happy to see this. I'm a little backed up at the moment, so will try to take a look in the next few days. For now I've approved the CI to run in case there are some small issues to address.

@imsnif imsnif self-assigned this Oct 22, 2021
@imsnif
Copy link
Member

imsnif commented Oct 25, 2021

Looks great, thanks!

@imsnif imsnif merged commit 21380c2 into zellij-org:main Oct 25, 2021
@a-kenji
Copy link
Contributor

a-kenji commented Nov 5, 2021

@Gnurou
Thank you for the contribution,
I am sure I am seeing the fruits of it already and it is a lot of fun.

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

Successfully merging this pull request may close these issues.

3 participants