[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:       Florian Bruhin <me () the-compiler ! org>
Date:       2016-09-08 10:04:05
Message-ID: 20160908100405.g436frsgnfikxnhh () tonks
[Download RAW message or body]

This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

[Attachment #2 (multipart/signed)]
This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.


* Xavion <xavion.0@gmail.com> [2016-09-08 07:57:22 +1000]:
> So, you're both saying that the following two lines are equivalent (from a
> memory footprint standpoint):
> 
>    - from PyQt5.QtCore import QVariant
>    - from PyQt5 import QtCore
> 
> In other words, in both cases, the whole of 'QtCore' will be imported
> (rather than just 'QVariant' in the first case).

Right.

> Florian: I think you're saying that I can reduce the memory usage by doing
> the following.  If so, can we get the UIC and RCC generators to behave this
> way?
> 
>    - from PyQt5 import QtCore
>    - mVariant = QtCore.QVariant
>    - del QtCore

No, that's not what I was saying - I was just saying this is roughly
what happens behind the scenes when you do "from PyQt5.QtCore import
QVariant". The "del QtCore" just makes that name unavailable again, it
doesn't change anything from a memory point of view.

Florian

-- 
http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

["signature.asc" (application/pgp-signature)]
[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