diff --git a/jedi/inference/references.py b/jedi/inference/references.py index f9263315..e5115ca1 100644 --- a/jedi/inference/references.py +++ b/jedi/inference/references.py @@ -11,8 +11,18 @@ from jedi.inference.gradual.conversion import convert_names _IGNORE_FOLDERS = ('.tox', 'venv', '__pycache__') -_OPENED_FILE_LIMIT = 1000 +_OPENED_FILE_LIMIT = 2000 +""" +Stats from a 2016 Lenovo Notebook running Linux: +With os.walk, it takes about 10s to scan 11'000 files (without filesystem +caching). Once cached it only takes 5s. So it is expected that reading all +those files might take a few seconds, but not a lot more. +""" _PARSED_FILE_LIMIT = 50 +""" +For now we keep the amount of parsed files really low, since parsing might take +easily 100ms for bigger files. +""" def _resolve_names(definition_names, avoid_names=()):