-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
Detailed steps to reproduce the problem?
It takes more than 500ms to import pymongo on windows 11.
`python -c "import time; start = time.perf_counter(); import pymongo; print(time.perf_counter() - start)"`
0.5733743999153376
Generating an import trace: (visualisation attached)
`python -X importtime -c "import pymongo; print(pymongo._version_)" 2> imports.log`
Definition of done: what must be done to consider the task complete?
Should not take more than 100ms just to import pymongo
The exact Python version used, with patch level:
$ python -c "import sys; print(sys.version)"
3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)]
The exact version of PyMongo used, with patch level:
$ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"
4.7.2
True
The operating system and version (e.g. Windows 7, OSX 10.8, ...)
Windows 11
- is related to
-
PYTHON-4977 Pymongo import is extremely slow on windows (PYTHON-4455 regression)
- Closed
- related to
-
PYTHON-4407 Issue loading the dns.resolver module with pymongo 4.7.0
- Closed
-
PYTHON-4260 Optimize pymongo import time
- Closed