[PyQt] Massive inflation of .qrc files

Pou Belle belepoub at gmail.com
Thu Jan 4 17:46:10 GMT 2018


I'm sorry, I don't know why my message appeared with "*' characters
everywhere, here it is again :



Scott Harvey wrote
> I've noticed that compiling a .qrc file into a qrc.py file results in a
> massive increase in size, especially when containing an image.
>
> File            Size
> -------                          -----------
> splash.png      97244
> splash.qrc          86
> splash_qrc.py  402588


Hello Scott,

Compile your splash_qrc.py into a splash_qrc.pyc file, it will become very
small again.

Here is what I get on my current project :

File                  Size
Resources (png, jpg) : 124172
resources.qrc :          429
resources_rc.py :      373507
resources_rc.pyc :      89712

The only file that will really be loaded by python (pyc : 89712) is even
smaller than the sum of the original files (124172).
pyrcc is making my life a lot easier, I love it.

Cheers.


2018-01-04 11:47 GMT+01:00 Pou Belle <belepoub at gmail.com>:

>
> *Scott Harvey wrote*
> *> I've noticed that compiling a .qrc file into a qrc.py file results in a*
> *> massive increase in size, especially when containing an image.*
> *> *
> *> File            Size*
> *> -------                          -----------*
> *> splash.png      97244*
> *> splash.qrc          86*
> *> splash_qrc.py  402588*
>
>
> *Hello Scott,*
>
> *Compile your splash_qrc.py into a splash_qrc.pyc file, it will become
> very small again.*
>
> *Here is what I get on my current project :*
>
> *File                  Size*
> *Resources (png, jpg) : 124172*
> *resources.qrc :          429*
> *resources_rc.py :      373507*
> *resources_rc.pyc :      89712*
>
> *The only file that will really be loaded by python (pyc : 89712) is even
> smaller than the sum of the original files (124172).*
> *pyrcc is making my life a lot easier, I love it.*
>
> *Cheers.*
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180104/9821d2dd/attachment.html>


More information about the PyQt mailing list