1
0
forked from VimPlug/jedi

Explain why the references limits were chosen

This commit is contained in:
Dave Halter
2020-01-20 17:24:21 +01:00
parent 6e10313cca
commit c12cbf2106

View File

@@ -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=()):