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

List:       pykde
Subject:    Re: [PyQt] Attempting to reduce the memory footprint of my PyQt5 application
From:       Elvis Stansvik <elvstone () gmail ! com>
Date:       2016-09-15 6:41:39
Message-ID: CAHms=eaJMn7=0-7vRQsW75Xie+Vu0ojK6JedtTm5+hZH1ADZLA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Den 15 sep. 2016 6:49 fm skrev "Xavion" <xavion.0@gmail.com>:
>>
>> Use subprocess? Simpler code and no leaks.
>>
>> subprocess.check_output([command] + args)
>
>
> I had a feeling someone would tell me to do that :-).
>
> Believe it or not, the same problem happens with the 'subprocess'
module.  As such, I have just opened a ticket on the Python bug tracker.
>
> I guess this news pretty much gets Qt and PyQt off the hook.  I'm sure
you guys are pleased about that :-).

You mentioned you're spawning a thread, which in turn spawn your process
(may I ask why the threading?). QProcess is designed to be used async on
top of the Qt event loop.

Are you sure that everything related to the thread is destroyed properly?

Another tip is to run the app for 15 seconds under valgrind to see where
your leak is.

Elvis

>
>
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[Attachment #5 (text/html)]

<p dir="ltr">Den 15 sep. 2016 6:49 fm skrev &quot;Xavion&quot; &lt;<a \
href="mailto:xavion.0@gmail.com">xavion.0@gmail.com</a>&gt;:<br> &gt;&gt;<br>
&gt;&gt; Use subprocess? Simpler code and no leaks.<br>
&gt;&gt;<br>
&gt;&gt; subprocess.check_output([command] + args)<br>
&gt;<br>
&gt;<br>
&gt; I had a feeling someone would tell me to do that :-).<br>
&gt;<br>
&gt; Believe it or not, the same problem happens with the &#39;subprocess&#39; \
module.   As such, I have just opened a ticket on the Python bug tracker.<br> \
&gt;<br> &gt; I guess this news pretty much gets Qt and PyQt off the hook.   I&#39;m \
sure you guys are pleased about that :-).</p> <p dir="ltr">You mentioned you&#39;re \
spawning a thread, which in turn spawn your process (may I ask why the threading?). \
QProcess is designed to be used async on top of the Qt event loop.</p> <p \
dir="ltr">Are you sure that everything related to the thread is destroyed \
properly?</p> <p dir="ltr">Another tip is to run the app for 15 seconds under \
valgrind to see where your leak is.</p> <p dir="ltr">Elvis</p>
<p dir="ltr">&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; PyQt mailing list      <a \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br> &gt; <a \
href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></p>



[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

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

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