New submission from Christian Heimes:

The site module is loaded at every startup. Nowadays it imports the re and the 
sysconfig modules. The re module is used for venv config parsing and inside 
sysconfig. sysconfig is loaded to find the location of the user's site-packages 
directory.

Suggestions:
- Only import re and compile CONFIG_LINE when a venv config file is found

- Don't rely on sysconfig for user's site-packages directory. Instead the 
sysconfig module should rely on site.py to get its location.

Without re and sysconfig Python would import only 45 instead of 56 modules at 
startup (tested on Linux).

----------
components: +Interpreter Core, Library (Lib)
stage:  -> needs patch
title: Don -> Don't import re and sysconfig in site.py
type:  -> performance
versions: +Python 3.4

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

Reply via email to