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

fix: Lean language server consuming excessive memory #11683

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

gruhn
Copy link
Contributor

@gruhn gruhn commented Sep 12, 2024

Apparently, the Lean process spawned by the language server can use excessive memory in certain situations. Even on very simple code files. That caused my system to freeze. See: leanprover/lean4#5321 . The language server accepts a CLI flag for limiting memory use. I set it to 1024MB, which might be a bit arbitrary, but definitely prevents the system from freezing. The language server seems to respect this limit. So it does not just crash when the limit is reached. Instead it even provides linting, which code lines cause this excessive memory use.

The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.
@the-mikedavis the-mikedavis added the A-language-support Area: Support for programming/text languages label Sep 14, 2024
@archseer archseer merged commit 5ce77de into helix-editor:master Sep 15, 2024
6 checks passed
@gruhn gruhn deleted the lean-lsp-memory-limit branch September 15, 2024 11:06
diucicd pushed a commit to diucicd/helix that referenced this pull request Sep 20, 2024
)

The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants