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

List:       kde-devel
Subject:    Re: APIDOX issue
From:       Michael Pyne <mpyne () purinchu ! net>
Date:       2008-07-18 22:19:29
Message-ID: 200807181819.32992.mpyne () purinchu ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/alternative)]


On Friday 18 July 2008, Andreas Pakulat wrote:
> > After some profiling, I found that it is not the signal-slot connection
> > who causes the trouble, but the continous QApplication::processEvents()
> > which I do to keep the application responsive. I have reduced this and
> > speeded up loading of 400 pieces from 20 to 4 seconds.
>
> Why do you need that? Why is loading the image and tiling it up not done
> in a separate thread? processEvents is _evil_ if you're not careful.


Even when you are careful it is still evil, and a set of crasher bugs waiting 
to happen.  Trust me, I should know. :(


If you'd like to use something like processEvents without multi-threading you 
could split the generation into discrete events and then simply post 
processing events to the message loop (such as by using QTimer::singleShot)


Regards,
 - Michael Pyne

[Attachment #7 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'Consolas'; font-size:11pt; \
font-weight:400; font-style:normal;">On Friday 18 July 2008, Andreas Pakulat \
wrote:<br> &gt; &gt; After some profiling, I found that it is not the signal-slot \
connection<br> &gt; &gt; who causes the trouble, but the continous \
QApplication::processEvents()<br> &gt; &gt; which I do to keep the application \
responsive. I have reduced this and<br> &gt; &gt; speeded up loading of 400 pieces \
from 20 to 4 seconds.<br> &gt;<br>
&gt; Why do you need that? Why is loading the image and tiling it up not done<br>
&gt; in a separate thread? processEvents is _evil_ if you're not careful.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"></p>Even when you are careful it is still evil, and a set of \
crasher bugs waiting to happen.  Trust me, I should know. :(<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>If \
you'd like to use something like processEvents without multi-threading you could \
split the generation into discrete events and then simply post processing events to \
the message loop (such as by using QTimer::singleShot)<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
                -qt-user-state:0;"></p>Regards,<br>
 - Michael Pyne</p></body></html>


["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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