Optimizing this will almost certainly involve patching Twisted. Which you should definitely do :).The reason the entire screen is redrawn is that a general implementation of a widget, i.e. one that can be displayed anywhere on the terminal, you do just have to redraw the entire widget when certain things happen, like when the screen scrolls. You can see this in other software by observing the fairly significant performance difference between a vertical split and a horizontal split in tmux. Nothing to do with Twisted there, just a general limitation of terminals.
The optimizations you could implement are one where inputting individual characters doesn't cause a full screen redraw, and avoiding a full screen redraw when scrolling if the edges of the widget touch the edges of the full terminal (setting up a scroll area for that case).
-glyph
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python