Brian Thomason <[EMAIL PROTECTED]> wrote: > We've been using PyQT/PyKDE here at Linspire for some time now to > develop a handful of applications. One of these is Lsongs, and it has > grown quite large and has a very large memory footprint. We're trying > to reduce this a bit in various ways (switching to gstreamer from > libxine for instance) and I was curious if there was a way to reduce the > footprint size of pyqt/pykde. The shared object files themselves are > quite large - Larger than their C++ counterparts. > > I'm totally ignorant on python bindings so this may just be "the way it > is" and that's fine. Just curious if there's a way to "shrink" these > down a bit.
One low-hanging fruit could be recompiling them through the upcoming GCC 4 using the new -fvisibility=hidden -fvisibility-inline-hidden options. By making only the needed symbols visibile (which AFAIK it is just one symbol for a Python extension module), the shared object size will reduce somehow, will be much much faster to load and will also be optimized better. See http://gcc.gnu.org/gcc-4.0/changes.html and http://www.nedprod.com/programs/gccvisibility.html for further reference. I'm sure there is already some infrastructure for this, as the windows version of qt.pyd exports just one visible symbol. -- Giovanni Bajo _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde