From d5fd847833ae7816861d4ed0be128035ff0625fd Mon Sep 17 00:00:00 2001 From: Boulanger Date: Mon, 15 Jul 2024 17:48:52 +0200 Subject: [PATCH 1/2] Add README section about memory consumption Closes eng/ide/ada_language_server#1342 --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 48402ead9..0c06210fa 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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, some Ada structures like generic and tagged types will take more +memory. This is also the case for aggregate project. +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) From f03ac52b8ad98364a7c8e308b104c329bdf5f878 Mon Sep 17 00:00:00 2001 From: Adrien Boulanger Date: Tue, 16 Jul 2024 09:34:29 +0000 Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Anthony Leonardo Gracio --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c06210fa..b9b4bfda9 100644 --- a/README.md +++ b/README.md @@ -136,8 +136,8 @@ The `ada_language_server` relies on [Libadalang](https://github.com/AdaCore/liba 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, some Ada structures like generic and tagged types will take more -memory. This is also the case for aggregate project. +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