ink icon indicating copy to clipboard operation
ink copied to clipboard

POC: Incremental rendering

Open marcus13371337 opened this issue 4 years ago • 2 comments

Did some digging on the following issue: https://github.com/vadimdemedes/ink/issues/359

Found that what's causing the flickering on iTerm2 is that the whole terminal window is erased and then rewritten. IMO iTerm does the right thing, which is to show an empty terminal and then add back the content -> boom we have a flickering. Another approach for updating the terminal would be what I have in this POC PR, which is to update only the rows that have been changed. Tested in my cli, but with some bugs such that React console messages are displayed in the top and stuck there forever. This is the same approach as other terminal packages seem to do as well.

Needs some improvements, of course, just a POC!

marcus13371337 avatar Jan 26 '21 06:01 marcus13371337

Bump

sindresorhus avatar Oct 04 '21 09:10 sindresorhus

@sindresorhus Hi again, sorry haven't had enough time to fix this PR to a proper state. However, the POC has been made IMO, that instead of erasing the whole window and then repaint it is what's causing the flickering. Updating one row at the time seems to fix that. Could someone pick it up from there?

marcus13371337 avatar Oct 07 '21 11:10 marcus13371337