Guido van Rossum <gu...@python.org> added the comment:

Deep-freezing is definitely not a miracle cure. We should continue to trim or 
delay unneeded imports (like Christian just did for setuptools' 
_distutils_hack).

What *would* be a miracle cure would be if we could deep-freeze the module 
contents after it has *executed*. But that is much harder in general, since two 
executions (even on the same platform) could result in different module 
contents (e.g. conditionally defining something based on environment contents).

Instagram's Cinder has something that works for this, strict modules 
(https://github.com/facebookincubator/cinder#strict-modules). It is a complex 
system! But if we could do this it could really speed up a lot of imports 
tremendously. (Though still at the cost of binary size increase.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45661>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to