From b8a92ecbe3ad085fdfff64683082c2111e0db330 Mon Sep 17 00:00:00 2001 From: David Halter Date: Tue, 11 Dec 2012 13:59:59 +0100 Subject: [PATCH] speed debugging for completions --- jedi/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jedi/api.py b/jedi/api.py index 6716a586..248991b4 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -105,6 +105,8 @@ class Script(object): pass return [name] + + debug.speed('complete start') path = self.module.get_path_until_cursor() path, dot, like = self._get_completion_parts(path) @@ -166,6 +168,7 @@ class Script(object): len(like), s) comps.append(new) + debug.speed('complete end') return sorted(comps, key=lambda x: (x.word.startswith('__'), x.word.startswith('_'), @@ -177,6 +180,7 @@ class Script(object): debug.dbg('start: %s in %s' % (goto_path, self.parser.scope)) user_stmt = self.parser.user_stmt + debug.speed('parsed') if not user_stmt and len(goto_path.split('\n')) > 1: # If the user_stmt is not defined and the goto_path is multi line, # something's strange. Most probably the backwards tokenizer