setuptools version
63.1.0
Python version
3.10.5
OS
Windows
Additional environment information
No response
Description
Importing setuptools is slow and takes nearly half a second. This imposes significant performance impact on CLI applications (Azure/azure-cli#23177).
Expected behavior
Importing setuptools should be fast.
How to Reproduce
Output
python -X importtime -c "import setuptools" 2>perf.log ; python -m tuna .\perf.log

Without setuptools, importing distutils is pretty fast:
python -X importtime -c "import distutils" 2>perf.log ; python -m tuna .\perf.log
