[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: Optimization for the duplicate paintop
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2006-05-30 6:10:22
Message-ID: 200605300810.24794.boud () valdyas ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 29 May 2006 23:39, Cyrille Berger wrote:
> Hello,
> I was working on optimizing the duplicate paintop, so with the help of
> Boudewijn I was able to cut the computation time by half.
>
> But after that first optimization, 80% of the time is spend in
> bltSelection, and more specificaly in
> KisSelection::isTotallyUnselected(QRect r), and I was wondering if changing
> the following line :
> QRect sr = selectedExactRect();
>
> by
>  QRect sr = selectedRect();
>
> was acceptable ? (it considerably increase the speed of the duplicate tool,
> but might have drawback).

The drawback is that the rect then is aligned with tile boundaries -- which 
means that it is larger than the rect really is. This may not matter too much 
in this particular case. It means that more pixels are considered for 
compositing, and then discarded, but that may well be less costly than my 
(stupid, simple-minded, straightforward, unoptimized) algorith for 
calculating the exact rect.

We use extactRect in many places, though, and optimizing it would be a great 
idea.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi

[Attachment #5 (application/pgp-signature)]

_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic