Speeding up plotting widget
John Tapsell
johnflux at gmail.com
Fri Jun 13 10:01:55 BST 2008
Hi all,
I profiled the code and found that 35% of the time is spent in
Oxygen repainting labels. I have a 8 labels which contain just a
number, and I update these all twice a second. This is really slow
with oxygen. It appears to be spending most of its time setting up
clipping.
Anyone know why qlabels + oxygen would be so slow, and if there's a
way to fix this?
Thanks!
John Tapsell
2008/6/11 Michael Pyne <mpyne at purinchu.net>:
> On Tuesday 10 June 2008, Uwe Thiem wrote:
>
>> 2.
>
>> bitBlt the buffer over into the widget instead of plotting in the
>
>> widget.
>
> bitBlt is gone in Qt 4. You can still use drawPixmap if you've got a
> QPainter on a QPixmap though.
>
> But painting is automatically double-buffered now, so this shouldn't buy you
> much (in theory).
>
> One thing I forgot, though, is to scroll the already-drawn portion of the
> sensor over and just draw the 2 or so pixels which you've uncovered. I'm not
> sure how to get the dashed lines to show up right though.
>
> Regards,
>
> - Michael Pyne
More information about the kde-core-devel
mailing list