Skip to content

Commit 0d92157

Browse files
committed
merge: completion timing
2 parents 105cab8 + b9b918d commit 0d92157

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/jvmMain/kotlin/io/github/dingyi222666/luaparser/lsp/LuaLanguageService.kt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ class LuaLanguageService(
581581
* (`Position(line + 1, character + 1)`) before hitting the semantic model.
582582
*/
583583
fun completion(path: String, line: Int, character: Int): CompletionList = synchronized(stateLock) {
584+
val t0 = System.currentTimeMillis()
584585
val items = queries.completions(pathFromClientPath(path), Position(line + 1, character + 1)).map { completion ->
585586
CompletionItem(completion.label).apply {
586587
kind = completion.kind.toLspKind()
@@ -590,6 +591,7 @@ class LuaLanguageService(
590591
sortText = completion.sortText
591592
}
592593
}
594+
println("LSP-DEVICE: completion ${System.currentTimeMillis() - t0}ms items=${items.size} ready=$snapshotReady path=$path")
593595
CompletionList(false, items)
594596
}
595597

0 commit comments

Comments
 (0)