[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:       Xavion <xavion.0 () gmail ! com>
Date:       2016-09-17 7:37:04
Message-ID: CAKnx8Y7u_ueACnf-cQ3t1X8WR1U38ujhT+aV50YSs+VRyc15xQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Yes, I can confirm that there's no leak when it's called in that fashion.
However, there is one when the timer is (re)called from within a loop.
I've just posted a new comment to the ticket
<http://bugs.python.org/issue28165> and attached code/output samples
(there) to illustrate my point.

While we're there, I found another leak in my program (manually).  It's to
do with overwriting of icons that are attached to widgets in memory.
Specifically,
I'm talking about the *QMainWindow* and *QSystemTrayIcon* classes.  I'm
sure there are other cases; I just haven't looked for them.

Each time I give either one of those a new icon (at runtime), my memory
footprint increases proportionately.  Trying to suck the old icon out first
and deleting it manually doesn't help.  Is Qt or PyQt likely to blame for
this lack of automatic cleanup, and how easy would it be to fix?

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div><div><font size="2" color="#000000">Yes, \
I can confirm that there&#39;s no leak when it&#39;s called in that fashion.   \
However, there is one when the timer is (re)called from within a loop.   I&#39;ve \
just posted a new comment to <a href="http://bugs.python.org/issue28165" \
target="_blank">the ticket</a> and attached code/output samples (there) to illustrate \
my point.</font></div><div><font size="2" color="#000000"><br></font></div><div><font \
size="2" color="#000000">While we&#39;re there, I found another leak in my program \
(manually).   It&#39;s to do with overwriting of icons that are attached to widgets \
in memory.   </font><font color="#000000">Specifically, I&#39;m talking about the \
<i>QMainWindow</i> and <i>QSystemTrayIcon</i> classes.   I&#39;m sure there are other \
cases; I just haven&#39;t looked for them.</font></div><div><font size="2" \
color="#000000"><br></font></div><div><font size="2" color="#000000">Each time I give \
either one of those a new icon (at runtime), my memory footprint increases \
proportionately.   Trying to suck the old icon out first and deleting it manually \
doesn&#39;t help.   Is Qt or PyQt likely to blame for this lack of automatic cleanup, \
and how easy would it be to fix?</font></div><div><font size="2" \
color="#000000"><br></font></div></div> </div></div>


[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