Skip to content

Commit d5fd847

Browse files
BoulangerAdrienBoulanger
Boulanger
authored andcommitted
Add README section about memory consumption
Closes eng/ide/ada_language_server#1342
1 parent 774b7e7 commit d5fd847

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ extension at
4343
- [Install](#install)
4444
- [Dependencies](#dependencies)
4545
- [Usage](#usage)
46+
- [Memory Consumption](#memory-consumption)
4647
- [Supported LSP Server Requests](#supported-lsp-server-requests)
4748
- [Protocol Extensions](#protocol-extensions)
4849
- [VS Code Extension](#vs-code-extension)
@@ -129,6 +130,16 @@ client provides its-own way to set such settings. You can use the `--config`
129130
option if you want to provide the configuration directly via a JSON file
130131
instead of specifying it via the requests listed just above.
131132

133+
### Memory Consumption
134+
135+
The `ada_language_server` relies on [Libadalang](https://github.com/AdaCore/libadalang) to compute the cross references.
136+
Most of this computation is done while indexing which will create an internal cache.
137+
The expected memory size of this cache is around 300Mb per 100k lines of Ada code.
138+
Furthermore, 450Mb are necessary for the runtime.
139+
Please note, some Ada structures like generic and tagged types will take more
140+
memory. This is also the case for aggregate project.
141+
These measures were taken using both Resident Set Size and [Valgrind massif](https://valgrind.org/docs/manual/ms-manual.html) on Ubuntu 22.04LTS.
142+
132143
## Supported LSP Server Requests
133144

134145
See [WiKi page](https://github.com/AdaCore/ada_language_server/wiki/Supported-LSP-requests)

0 commit comments

Comments
 (0)