RFC: option to not load .ilean content in language server
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- backend-api-design
Research direction
Start by tracing how lake serve -- and lean --server load .ilean files into RAM; the issue does not name the relevant files or tests. Determine whether one option can cover both entry points and what server behavior must remain available without auxiliary information. Done means an optional --no-ilean flag prevents loading those files while preserving the described language server functionality.
Written by the indexing model from the issue text.
Description
Proposal
We propose a new, optional flag --no-ilean to lake serve -- (rsp. lean --server) which tells the server not to load any .ilean files into RAM.
Optionally, lake build could have an option not even generating them, but this is far less important than the loading as disk space is less restricted than RAM usage.
-
User Experience/Beneficiaries: Programmatic interaction with the language server, like e.g. in
lean4game, might not provide any features using the auxilary information coming fromileanfiles and could thus avoid loading them without loss of functionality.
This would avoid a significant amount of RAM usage, about 30 % according to our measurements on a project usingmathlib. -
Maintainability: hopefully, this would be as simple as disabling a certain piece of code and thus not be adding a significant maintenance overhead.
-
Workaround: we can work around this by manually replacing all
.ileanfiles in the project with empty files, as it seems thatlake builddoes not recreate the content. Alternatively, we can delete all files after eachlake buildas it seems that the language server can correctly handle missing files already. -
Further Context: It seems that from
v4.37.0on, there will be a feature to use.mmap.ileanwhich can be shared between processes. This would likely already reduce the mentioned RAM usage, but completely disabling the feature would still be more efficient.
Community Feedback
(only discussed in private topics and DMs so far)
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
- Dominant language
- Lean
- Stars
- 10.3k
- Forks
- 1.1k
- Avg merge
- 19h 8m
- Merged PRs (30d)
- 421
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from leanprover/lean4
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
leanprover/lean4#16681 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
leanprover/lean4#16305 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
leanprover/lean4#16299 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
leanprover/lean4#16257 ·
Maintainers usually reply within 1 day
-
`IO.FS.realPath` reports every failure as `noFileOrDirectory` instead of classifying by `errno`Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
leanprover/lean4#15683 ·
Maintainers usually reply within 1 day
All issues in leanprover/lean4
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vllm-project/vllm-sail#398 ·
Maintainers usually reply within 1 day
-
kubernetes-ingestor: fetchCRDMapping() runs even when crossplane.enabled is false, logging a 403 ERROR every runPossibly taken @kc9ddi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TeraSky-OSS/backstage-plugins#228 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
nightscout/nocturne#4057 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
opendatalab/MinerU#5800 · 2 comments ·
Maintainers usually reply within 1 day