mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-25 09:48:36 +08:00
added an option to disable get_in_function_call caching
This commit is contained in:
+7
-5
@@ -386,11 +386,12 @@ class Script(object):
|
|||||||
raise NotFoundError()
|
raise NotFoundError()
|
||||||
|
|
||||||
debug.speed('func_call start')
|
debug.speed('func_call start')
|
||||||
try:
|
call = None
|
||||||
call, index = check_cache()
|
if settings.use_get_in_function_call_cache:
|
||||||
except NotFoundError:
|
try:
|
||||||
return None
|
call, index = check_cache()
|
||||||
debug.speed('func_call parsed')
|
except NotFoundError:
|
||||||
|
return None
|
||||||
|
|
||||||
if call is None:
|
if call is None:
|
||||||
# This is a backup, if the above is not successful.
|
# This is a backup, if the above is not successful.
|
||||||
@@ -398,6 +399,7 @@ class Script(object):
|
|||||||
call, index = check_user_stmt(user_stmt)
|
call, index = check_user_stmt(user_stmt)
|
||||||
if call is None:
|
if call is None:
|
||||||
return None
|
return None
|
||||||
|
debug.speed('func_call parsed')
|
||||||
|
|
||||||
debug.speed('func_call user_stmt')
|
debug.speed('func_call user_stmt')
|
||||||
with common.scale_speed_settings(settings.scale_get_in_function_call):
|
with common.scale_speed_settings(settings.scale_get_in_function_call):
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ fast_parser = True
|
|||||||
# is basically useless. So don't use it.
|
# is basically useless. So don't use it.
|
||||||
fast_parser_always_reparse = False
|
fast_parser_always_reparse = False
|
||||||
|
|
||||||
|
# Use the cache (full cache) to generate get_in_function_call's. This may fail
|
||||||
|
# with multiline docstrings (likely) and other complicated changes to the fail
|
||||||
|
# (unlikely). The goal is to move away from it by making the rest faster.
|
||||||
|
use_get_in_function_call_cache = True
|
||||||
|
|
||||||
# ----------------
|
# ----------------
|
||||||
# dynamic stuff
|
# dynamic stuff
|
||||||
# ----------------
|
# ----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user