diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-01 15:06:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-01 15:06:06 +0800 |
commit | 6a02e5c4b0c3bebf009fe4c455fe6b0f36cd7a52 (patch) | |
tree | ae067311c363568f7a4301a7d09d7659a51498e1 /script/core/completion.lua | |
parent | 9898f87795b5c3cf096197c6f9c92e368addb2a3 (diff) | |
download | lua-language-server-6a02e5c4b0c3bebf009fe4c455fe6b0f36cd7a52.zip |
completion delays for 10 ms
Diffstat (limited to 'script/core/completion.lua')
-rw-r--r-- | script/core/completion.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua index 3add81e3..96115471 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -1827,15 +1827,19 @@ local function clearCache() end local function completion(uri, offset) + tracy.ZoneBeginN 'completion cache' local results = getCache(uri, offset) + tracy.ZoneEnd() if results then return results end + tracy.ZoneBeginN 'completion #1' local ast = files.getAst(uri) local text = files.getText(uri) results = {} clearStack() - tracy.ZoneBeginN 'completion' + tracy.ZoneEnd() + tracy.ZoneBeginN 'completion #2' if ast then if getComment(ast, offset) then tryLuaDoc(ast, text, offset, results) @@ -1860,7 +1864,9 @@ local function completion(uri, offset) return nil end + tracy.ZoneBeginN 'completion #3' makeCache(uri, offset, results) + tracy.ZoneEnd() return results end |