PaulJuliusMartinez / jless

jless is a command-line JSON viewer designed for reading, exploring, and searching through JSON data.
https://jless.io
MIT License
4.79k stars 92 forks source link

remove redundant screen clearing #124

Closed halvabner closed 1 year ago

halvabner commented 1 year ago

To reproduce: try using jless in urxvt

Problem: jless redundantly draws an empty screen and then redraws the entire new updated screen, even if it's just scrolling down.

This causes terminals that have a more frequent update rate like urxvt to make it unusable because it shows every time it clears and redraws.

PaulJuliusMartinez commented 1 year ago

The latest version of jless clears lines individually now, instead of clearing the entire screen. Can you try it out and let me know if that improves things?

Totally optimized screen rendering (only re-drawing the actual characters that have changed) is a significantly more work, so hopefully this is better.

halvabner commented 1 year ago

works like a charm, thanks ^_^. now it's my fav json viewer

PaulJuliusMartinez commented 1 year ago

Fantastic! And thanks for the report.