我注意到函数clear()将所有屏幕重新传输到终端而不是仅传输差异,例如ncurses除外。
我正在使用SSH,所以我可以在180x60终端上看到差异:
清除使用clear():20kB / s 没有清除:200B / s刷新率为0.5秒,每帧之间的差异约为20个字符。
我们如何更有效地解释这个并清除屏幕?
I noticed that function clear() retransmit all screen to terminal instead of transmitting only the differences, as excepted with ncurses.
I'm working with SSH so I can see the difference on a 180x60 terminal :
with clearing using clear() : 20kB/s without clearing : 200B/sThe refresh rate is 0.5s and the differences between each frame is about 20 characters.
How can we explain this and clear screen more efficiently ?
最满意答案
从手册页:
明确和清晰的例程就像擦除和删除,但它们也调用clearok,以便在下次调用该窗口的wrefresh时完全清除屏幕并从头开始重新绘制。
尝试erase()
From the man page:
The clear and wclear routines are like erase and werase, but they also call clearok, so that the screen is cleared completely on the next call to wrefresh for that window and repainted from scratch.
Try erase()
更多推荐
发布评论