Author vstinner
Recipients ethan.furman, gvanrossum, ned.deily, python-dev, vstinner
Date 2016-11-08.00:49:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478566155.49.0.880085765461.issue28637@psf.upfronthosting.co.za>
In-reply-to
Content
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 :-)
History
Date User Action Args
2016-11-08 00:49:15vstinnersetrecipients: + vstinner, gvanrossum, ned.deily, ethan.furman, python-dev
2016-11-08 00:49:15vstinnersetmessageid: <1478566155.49.0.880085765461.issue28637@psf.upfronthosting.co.za>
2016-11-08 00:49:15vstinnerlinkissue28637 messages
2016-11-08 00:49:15vstinnercreate