[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: Kovid Goyal <kovid () kovidgoyal ! net>
Date: 2016-09-15 6:25:50
Message-ID: 20160915061350.GN5097 () qedette
[Download RAW message or body]
That seems highly unlikely, and I cannot reproduce it on my Arch Linux
system, with the following script:
import psutil
import subprocess
import time
import gc
import os
p = psutil.Process(os.getpid())
print(p.memory_info())
while True:
subprocess.check_output(['true'])
time.sleep(1)
gc.collect(), gc.collect(), gc.collect()
print(p.memory_info())
Output memory usage stays constant after the first two iterations.
Kovid.
On Thu, Sep 15, 2016 at 02:48:23PM +1000, Xavion wrote:
> >
> > 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 <http://bugs.python.org/issue28165> 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 :-).
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
--
_____________________________________
Dr. Kovid Goyal
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________
_______________________________________________
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