forked from VimPlug/jedi
Remove inspecting the stack in the debugger.
This feature wasn't used anymore and it made debugging a slower by a factor of 10-10000.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
from jedi._compatibility import encoding, is_py3, u
|
from jedi._compatibility import encoding, is_py3, u
|
||||||
import inspect
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@@ -61,7 +60,6 @@ enable_notice = False
|
|||||||
|
|
||||||
# callback, interface: level, str
|
# callback, interface: level, str
|
||||||
debug_function = None
|
debug_function = None
|
||||||
ignored_modules = ['jedi.parser']
|
|
||||||
_debug_indent = 0
|
_debug_indent = 0
|
||||||
_start_time = time.time()
|
_start_time = time.time()
|
||||||
|
|
||||||
@@ -91,12 +89,9 @@ def dbg(message, *args, **kwargs):
|
|||||||
assert color
|
assert color
|
||||||
|
|
||||||
if debug_function and enable_notice:
|
if debug_function and enable_notice:
|
||||||
frm = inspect.stack()[1]
|
i = ' ' * _debug_indent
|
||||||
mod = inspect.getmodule(frm[0])
|
_lazy_colorama_init()
|
||||||
if not (mod.__name__ in ignored_modules):
|
debug_function(color, i + 'dbg: ' + message % tuple(u(repr(a)) for a in args))
|
||||||
i = ' ' * _debug_indent
|
|
||||||
_lazy_colorama_init()
|
|
||||||
debug_function(color, i + 'dbg: ' + message % tuple(u(repr(a)) for a in args))
|
|
||||||
|
|
||||||
|
|
||||||
def warning(message, *args, **kwargs):
|
def warning(message, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user