On Thu, Jan 21, 2010 at 09:32:23AM -0800, Collin Winter wrote:
> Hi Dirkjan,
> 
> On Wed, Jan 20, 2010 at 10:55 PM, Dirkjan Ochtman <dirk...@ochtman.nl> wrote:
> > For some apps (like Mercurial, which I happen to sometimes hack on),
> > increased startup time really sucks. We already have our demandimport
> > code (I believe bzr has something similar) to try and delay imports,
> > to prevent us spending time on imports we don't need. Maybe it would
> > be possible to do something like that in u-s? It could possibly also
> > keep track of the thorny issues, like imports where there's an except
> > ImportError that can do fallbacks.
> 
> I added startup benchmarks for Mercurial and Bazaar yesterday
> (http://code.google.com/p/unladen-swallow/source/detail?r=1019) so we
> can use them as more macro-ish benchmarks, rather than merely starting
> the CPython binary over and over again. If you have ideas for better
> Mercurial/Bazaar startup scenarios, I'd love to hear them. The new
> hg_startup and bzr_startup benchmarks should give us some more data
> points for measuring improvements in startup time.
> 
This is great!

> One idea we had for improving startup time for apps like Mercurial was
> to allow the creation of hermetic Python "binaries", with all
> necessary modules preloaded. This would be something like Smalltalk
> images. We haven't yet really fleshed out this idea, though.
> 
Coming from a background building packages for a Linux distribution I'd like
to know what you're designing here.  There's may things that you could mean,
most of them having problems.  An image with all of the modules contained in
it is like a statically linked binary in the C world.  This can bloat our
livemedia installs, make memory usage go up if the modules were
sharable before and no longer are, cause pain in hunting down affected
packages and getting all of the rebuilt packages to users when a security
issue is found in a library, and, for some strange reason, encourages
application authors to bundle specific versions of libraries with their
apps.

So if you're going to look into this,please be careful and try to minimize
the tradeoffs that can occur.

Thanks,
-Toshio

Attachment: pgpWt8kT5xbkd.pgp
Description: PGP signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to