One plan I have to hopefully reduce gnome-terminal's CPU usage and time to output text is to only redraw the terminal widget (vte) a certain number of times a second.
My goal would be about 200 full refreshes per second (which should be well above human ability to notice visual change). Right now, it looks like we just update as fast as possible (leading to a lot of wasted effort). I tried throwing in a simple check within the main vte redraw function, to only redraw if the last redraw was at least a minimum time ago. The obvious bug with this is that redraws only get one chance. Any lost redraws are never recovered (leading to an almost never-redrawn terminal). The speed improvements were obvious (about 30%-50%) when outputting a lot of text, though the CPU load did not really lower. Quick tests with sysprof shows the burden shifting over to different functions. So the question is the safest way to (safely!) skip unnecessary redraws. I think the best choice would be to have a timer (set to about 5 ms intervals) to check whether the terminal widget should be redrawn. There already exist members in the VteTerminal structure to track whether to redraw it. Would a short set of checks every 5 ms or so be too much of a burden to be worthwhile? -Travis _______________________________________________ Performance-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/performance-list
