Skip to content

Commit

Permalink
PERF: get_requirement() raise cache from 2048 to 8192 elements
Browse files Browse the repository at this point in the history
  • Loading branch information
rmmancom committed Jul 23, 2024
1 parent 5fb46a3 commit b9eef58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pip/_internal/utils/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def check_requires_python(
python_version = version.parse(".".join(map(str, version_info)))
return python_version in requires_python_specifier


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

0 comments on commit b9eef58

Please sign in to comment.