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

List:       kde-kimageshop
Subject:    Re: Yet another bug. This time filters vs selections
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2009-09-10 16:55:46
Message-ID: ae32c1ef0909100955x5d791a3br9117196d2111d04f () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Sep 10, 2009 at 12:18 PM, Cyrille Berger <cberger@cberger.net>wrote:

> On Wednesday 09 September 2009, Dmitry Kazakov wrote:
> > > to use such a solution for Shiva based filters, since OpenShiva doesn't
> > > know anything about masks and selections.
> >
> > I don't know how to make a benchmark of that, i guess, it would be
> > interesting to look at. We could test for the cold-cache problem at
> least.
> > (We could assume that big holes in a selection are quite rare and not
> very
> > important).
> To benchmark that, since currently it doesn't work, it's quiet easy to test
> the speed of method 2.
>
>
> You just have to make something like:
>
>
> * KisPaintDevice tmp;
> * filter->process(KisProcessInfo(src, src.origin() ), KisProcessInfo(tmp,
> QPoint(0,0), selection()), size);
> * then apply the mask on dst
>
>
> And see the overhead of applying the mask. It's still worth to pass the
> selection, so that we don't compute pixel value when the pixel is
> unselected.
>

Yes, it's not so good to filter unneeded areas, but iterating pixel by pixel
can create even bigger overhead due to cache footprint
 I'll try to make some tests now.



> Thinking about that, the highest cost will be the creation of tiles for the
> tmp KisPaintDevice
>

It can be smoothed a bit by a new tile3 engine with it's pooler and COW.


> and the need to iterate twice.
>

That is worse. But i'll take a try.




-- 
Dmitry Kazakov

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Thu, Sep 10, 2009 at 12:18 PM, Cyrille Berger \
<span dir="ltr">&lt;<a \
href="mailto:cberger@cberger.net">cberger@cberger.net</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="font-family: \
&#39;DejaVu Sans&#39;; font-size: 9pt; font-weight: 400; font-style: normal;"><div \
class="im">On Wednesday 09 September 2009, Dmitry Kazakov wrote:<br> &gt; &gt; to use \
such a solution for Shiva based filters, since OpenShiva doesn&#39;t<br> &gt; &gt; \
know anything about masks and selections.<br> &gt;<br>
&gt; I don&#39;t know how to make a benchmark of that, i guess, it would be<br>
&gt; interesting to look at. We could test for the cold-cache problem at least.<br>
&gt; (We could assume that big holes in a selection are quite rare and not very<br>
&gt; important).<br></div>
To benchmark that, since currently it doesn&#39;t work, it&#39;s quiet easy to test \
the speed of method 2.<br> <p style="margin: 0px; text-indent: 0px;"><br></p>You just \
have to make something like:<br> <p style="margin: 0px; text-indent: 0px;"><br></p>* \
                KisPaintDevice tmp;<br>
* filter-&gt;process(KisProcessInfo(src, src.origin() ), KisProcessInfo(tmp, \
                QPoint(0,0), selection()), size);<br>
* then apply the mask on dst<br>
<p style="margin: 0px; text-indent: 0px;"><br></p>And see the overhead of applying \
the mask. It&#39;s still worth to pass the selection, so that we don&#39;t compute \
pixel value when the pixel is unselected.<br></div></blockquote> <div><br>Yes, \
it&#39;s not so good to filter unneeded areas, but iterating pixel by pixel can \
create even bigger overhead due to cache footprint<br>  I&#39;ll try to make some \
tests now. <br></div><div><br>  </div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> <div style="font-family: &#39;DejaVu Sans&#39;; font-size: 9pt; \
font-weight: 400; font-style: normal;">Thinking about that, the highest cost will be \
the creation of tiles for the tmp KisPaintDevice</div></blockquote><div> <br>It can \
be smoothed a bit by a new tile3 engine with it&#39;s pooler and COW.<br>  \
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="font-family: \
&#39;DejaVu Sans&#39;; font-size: 9pt; font-weight: 400; font-style: normal;">  and \
the need to iterate twice.<br clear="all"></div></blockquote></div><br>That is worse. \
But i&#39;ll take a try.<br><br><br><br><br>-- <br>Dmitry Kazakov<br>



_______________________________________________
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