Skip to content

Commit

Permalink
Merge branch 'topic/als.1342.readme_mem_section' into 'master'
Browse files Browse the repository at this point in the history
Add README section about memory consumption

Closes #1342

See merge request eng/ide/ada_language_server!1616
  • Loading branch information
AdrienBoulanger committed Jul 16, 2024
2 parents 774b7e7 + f03ac52 commit b858e26
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extension at
- [Install](#install)
- [Dependencies](#dependencies)
- [Usage](#usage)
- [Memory Consumption](#memory-consumption)
- [Supported LSP Server Requests](#supported-lsp-server-requests)
- [Protocol Extensions](#protocol-extensions)
- [VS Code Extension](#vs-code-extension)
Expand Down Expand Up @@ -129,6 +130,16 @@ client provides its-own way to set such settings. You can use the `--config`
option if you want to provide the configuration directly via a JSON file
instead of specifying it via the requests listed just above.

### Memory Consumption

The `ada_language_server` relies on [Libadalang](https://github.com/AdaCore/libadalang) to compute the cross references.
Most of this computation is done while indexing which will create an internal cache.
The expected memory size of this cache is around 300Mb per 100k lines of Ada code.
Furthermore, 450Mb are necessary for the runtime.
Please note that some Ada structures like generics and tagged types might
increase the memory usage. This is also the case when using aggregate projects.
These measures were taken using both Resident Set Size and [Valgrind massif](https://valgrind.org/docs/manual/ms-manual.html) on Ubuntu 22.04LTS.

## Supported LSP Server Requests

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

0 comments on commit b858e26

Please sign in to comment.