[cairo] Reducing CPU usage in News Ticker Implementation

Darwin Bautista djclue917 at gmail.com
Fri Aug 31 01:35:06 PDT 2007


Hi all,

I just want to know if there's a more efficient way of implementing a
news ticker. Currently, I'm using my own "Cairo-fied" version of the
ticker widget used in pyt!ck (
http://whatah.nyunderground.net/code/pytick/ ). The problem is that
the ticker consumes a lot of CPU when the Pango layout is relatively
big (377 character-long text, DejaVu Serif Semi-Condensed 40) since X
performs a lot of redrawing every second (e.g., 50 redraws/second if
the scroll timeout is set to 20ms).

Attached is the source of the modified ticker widget.

-- 
Darwin M. Bautista
BS Electronics and Communications Engineering
University of the Philippines Diliman
http://www.darwin.uk.to

University of the Philippines Linux Users' Group
http://www.uplug.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ticker.py
Type: application/octet-stream
Size: 2965 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20070831/2a2160cf/attachment-0001.obj 


More information about the cairo mailing list