1
0
forked from VimPlug/jedi

Files bigger than one MB (about 20kLOC) get cropped to avoid getting stuck completely

Fixes #843
This commit is contained in:
Dave Halter
2019-12-14 12:39:37 +01:00
parent 7639bc2da9
commit 3219f14c63
4 changed files with 38 additions and 8 deletions

View File

@@ -112,6 +112,14 @@ something has been changed e.g. to a function. If this happens, only the
function is being reparsed.
"""
_cropped_file_size = 10e6 # 1 Megabyte
"""
Jedi gets extremely slow if the file size exceed a few thousand lines.
To avoid getting stuck completely Jedi crops the file this point.
One megabyte of typical Python code equals about 20'000 lines of code.
"""
# ----------------
# dynamic stuff
# ----------------