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

Very slow 0.24.1 and a lot of errors in log #1133

Open
hissssst opened this issue Nov 21, 2024 · 3 comments
Open

Very slow 0.24.1 and a lot of errors in log #1133

hissssst opened this issue Nov 21, 2024 · 3 comments

Comments

@hissssst
Copy link

hissssst commented Nov 21, 2024

Environment

  • Elixir & Erlang versions (elixir --version):
Erlang/OTP 26 [erts-14.2.5.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir 1.16.3 (compiled with Erlang/OTP 26)
  • Elixir Language Server version: v0.24.1
  • Operating system: linux
  • Editor or IDE name (e.g. Emacs/VSCode): Kakoune
  • Editor Plugin/LSP Client name and version: ...

Current behavior

When hovering any function in OtherModule it takes too long to display doc and DEBUG log is filled with things like this about every macro used in OtherModule

Nov 21 01:32:11.950 DEBG To editor `xxx`: evaluate-commands -verbatim -try-client 'client0' lsp-show-message-log 'elixir:elixir-ls' 'Unable to expand macro SomeModule.__using__/1: ** (ArgumentError) could not call Module.put_attribute/3 because the module OtherModule is already compiled
    (elixir 1.16.3) lib/module.ex:2360: Module.assert_not_readonly!/2
    (elixir 1.16.3) lib/module.ex:2041: Module.__put_attribute__/5
    (project 0.1.0) lib/some_module.ex:94: SomeModule."MACRO-__using__"/2
    (elixir_sense 2.0.0) lib/elixir_sense/core/normalized/macro/env.ex:68: anonymous fn/5 in ElixirSense.Core.Normalized.Macro.Env.wrap_expansion/7
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:1889: ElixirSense.Core.Compiler.expand_macro_callback/7
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:28: ElixirSense.Core.Compiler.expand/3
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:2126: ElixirSense.Core.Compiler.expand_block/5
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:103: ElixirSense.Core.Compiler.do_expand/3
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:28: ElixirSense.Core.Compiler.expand/3
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:1913: ElixirSense.Core.Compiler.expand_macro_callback/7
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:28: ElixirSense.Core.Compiler.expand/3
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:2144: ElixirSense.Core.Compiler.expand_block/5
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:103: ElixirSense.Core.Compiler.do_expand/3
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:28: ElixirSense.Core.Compiler.expand/3
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler/clauses.ex:53: ElixirSense.Core.Compiler.Clauses.clause/4
    (elixir_sense 2.0.0) lib/elixir_sense/core/compiler/fn.ex:16: anonymous fn/3 in ElixirSense.Core.Compiler.Fn.expand/4

Try hovering any function in any module and check these logs

Expected behavior

Docs displayed much faster, like they used to be in previous release I used (no idea which version though)

@hissssst
Copy link
Author

I also experience same errors when typing any character. Each time, error for every macro in module

@lukaszsamson
Copy link
Collaborator

The logged error is harmless. Please share a repro of a module that is particularly slow with hover etc.

@hissssst
Copy link
Author

I can't share a repro, it's a private project. But this error is occurring like 1000 of times on a single action. It might not be the issue, but it is strange that this error is there in the first place

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