STINNER Victor added the comment:

Possible options:
> 3. avoid the use of re in site.py venv

That would be a tiny but nice enhancement.

re is a commonly used module. I would prefer to not make its import time 
slower. Python 3 startup is already something like 3x slower than Python 2. 
Please don't make it even slower :-( We worked on optimizing Python 3 startup 
time.


> 2. find a way to mitigate the performance impact of importing re and enum 
> (perhaps making them builtins in Setup.dist?)

I reverted the change, because Guido and Ethan seem to be in favor of a revert, 
and I don't expect any simple solution for this issue.

I'm quite sure that importing enum.py is slow. Optimizing enum.py import time 
is a large task.

Another option to explore is to delay the creation/instanciation of the re 
flags, something like lazy module import... but at the module attribute level 
:-)

----------

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

Reply via email to