Speeding up plotting widget
John Tapsell
johnflux at gmail.com
Mon Jun 9 10:18:00 BST 2008
Hi all,
I'm trying to improve the plotting widget thing in the kde system
monitor (aka ksysguard). Basically it draws white background,
horizontal/vertical lines, and then plots the cpu usage etc lines on
top.
I am finding that this is taking around 30% of the CPU, which makes
it kinda useless for monitoring what the cpu usage is :-D
The reason for it being slow is not obvious to me.
If I draw just a white background, it takes 1% CPU usage.
If I draw a white background + _dashed_ horizontal lines (updating
twice a second), it takes up 10% CPU time (on dual core. so 20% of
one CPU).
If I draw a white background + _straight_ horizontal lines (updating
twice a second), it takes up 1% CPU time
There seem to be other reasons as to why it's slow, but this seems to
be a good place to start. Why would drawing dashed lines be so slow?
(It's about 10 horizontal lines, stretching across my screen (so about
1000 pixels long).
How can I try to speed this up?
Thanks!
John Tapsell
More information about the kde-core-devel
mailing list