memory overhead using from-import?

Jp Calderone exarkun at intarweb.us
Mon Dec 22 05:26:57 CET 2003


On Sun, Dec 21, 2003 at 08:16:00PM +0000, William Trenker wrote:
> Bengt Richter wrote:
> 
> > I think to extract an
> > "independent" function or class etc. without all the entanglements would
> > require source processing, and extracting only what was necessary to support
> > the thing to be extracted.
> 
> Yes, it looks like you're right.  There was talk, at one time, of being
> able to import modules from a zip file.  If that was possible then maybe
> it would be more efficient if all the independent utility functions in the
> python library were grouped together as a collection of little modules
> distributed in such a zip file.  Then only the overhead of each small,
> independent function would be incurred when such a utility function was
> imported.

  Err... This was implemented.  I definitely don't see the point of giving
every function its own module.  I think you should step back for a moment
and consider exactly what and why you want to optimize.

  Jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20031221/e3fd4aa4/attachment.pgp>


More information about the Python-list mailing list