On Sat, Jun 10, 2006 at 11:39:04AM +0200, Lars Gullik Bjønnes wrote:
> Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> 
> | This simple patch saves 4 seconds in the PageDown test.
> | 
> | Committed in the "younes" branch.
> 
> A Q. What is expensive about pens? Creation or changing between them?

Both. (sort of)

A QPen is a pretty complex structure with (depending on use) a couple of
dynamic allocations and reference counting.

TT's theory here is that neither is particular expensive, however, when
doing such stuff lots of times it accumulates to a significant (and
measurable) amount of time. I have timing results for that at work but
don't know them by heart.

Now, if an actual pen changed in the painter quite a bit of 'updating'
code runs in the next drawing operation. That also involves copying
and creating pens.

In the end, changing a pen is more expensive than drawing a few simple
items.

Andre'

Reply via email to