Skip to content

Commit 29e0e68

Browse files
committed
PERF: get_requirement() raise cache from 2048 to 8192 elements
small performance improvements when installing hundreds of packages.
1 parent d97fd0b commit 29e0e68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pip/_internal/utils/packaging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def check_requires_python(
3535
return python_version in requires_python_specifier
3636

3737

38-
@functools.lru_cache(maxsize=2048)
38+
@functools.lru_cache(maxsize=10000)
3939
def get_requirement(req_string: str) -> Requirement:
4040
"""Construct a packaging.Requirement object with caching"""
4141
# Parsing requirement strings is expensive, and is also expected to happen

0 commit comments

Comments
 (0)