Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extreme slowness finding references #689

Closed
jwbaldwin opened this issue Apr 22, 2022 · 1 comment
Closed

Extreme slowness finding references #689

jwbaldwin opened this issue Apr 22, 2022 · 1 comment

Comments

@jwbaldwin
Copy link

jwbaldwin commented Apr 22, 2022

Environment

  • Elixir & Erlang versions (elixir --version):
    1.13.3-otp-24

  • Elixir Language Server version:
    latest

  • Operating system:
    ProductName: macOS Monterey
    ProductVersion: 12.1
    BuildVersion: 21C52

  • Editor or IDE name (e.g. Emacs/VSCode):
    Neovim with builtin lsp

  • Editor Plugin/LSP Client name and version:
    neovim builtin lsp

Current behavior

Most lsp functions are fast (as I'd expect) but finding references takes REALLY long to execute:

vim.lsp.buf.references: 10 - 30 seconds to find even a single reference

lsp logs of finding 2 references (edited some information out)

[DEBUG][2022-04-22 10:24:27] .../vim/lsp/rpc.lua:454    "rpc.receive"   {  jsonrpc = "2.0",  method = "$/status/report",  params = {    text = "😺Lua",    tooltip = "Workspace   : \nCached
 files: 209/204\nMemory usage: 100M\n"  }}
[DEBUG][2022-04-22 10:24:29] .../vim/lsp/rpc.lua:454    "rpc.receive"   {  jsonrpc = "2.0",  method = "$/status/report",  params = {    text = "😺Lua",    tooltip = "Workspace   : \nCached
 files: 209/204\nMemory usage: 99M\n"  }}
[DEBUG][2022-04-22 10:24:32] .../lua/vim/lsp.lua:1023   "LSP[elixirls]" "client.request"        1       "textDocument/references"       {  context = {    includeDeclaration = true  },  pos
ition = {    character = 33,    line = 0  },  textDocument = {    uri = "file:///Users/<redacted file path>"  }}        <functio
n 1>    4
[DEBUG][2022-04-22 10:24:32] .../vim/lsp/rpc.lua:347    "rpc.send"      {  id = 5,  jsonrpc = "2.0",  method = "textDocument/references",  params = {    context = {      includeDeclaration
 = true    },    position = {      character = 33,      line = 0    },    textDocument = {      uri = "file:///Users/<redacted file path>"    }  }}
[DEBUG][2022-04-22 10:24:36] .../vim/lsp/rpc.lua:454    "rpc.receive"   {  jsonrpc = "2.0",  method = "$/status/report",  params = {    text = "😺Lua",    tooltip = "Workspace   : \nCached
 files: 204/204\nMemory usage: 99M\n"  }}
[DEBUG][2022-04-22 10:24:58] .../vim/lsp/rpc.lua:454    "rpc.receive"   {  id = 5,  jsonrpc = "2.0",  result = { {      range = {        end = {          character = 64,          line = 39
        },        start = {          character = 60,          line = 39        }      },      uri = "file:///Users/<redacted file path>"    }
, {      range = {        end = {          character = 73,          line = 54        },        start = {          character = 69,          line = 54        }      },      uri = "file:///Us
ers/<redacted file path>"    } }}
[DEBUG][2022-04-22 10:25:34] .../vim/lsp/rpc.lua:454    "rpc.receive"   {  jsonrpc = "2.0",  method = "$/status/report",  params = {    text = "😺Lua",    tooltip = "Workspace   : \nCached
 files: 204/204\nMemory usage: 100M\n"  }}

Expected behavior

That it's as fast as all the rest of the functions or at least as fast as go to references in vscode/emacs

@lukaszsamson
Copy link
Collaborator

References provider implementation has been replaced in #724 and now references database is built during normal compilation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants