Ensure memory-efficient high-level document symbol cache #944

* Introduce SymbolBody representation (compact), from which the
    body can be reconstructed, rendering body computation lazy
  * Introduce SymbolBodyFactory for the creation of such instances,
    ensuring that instances created from the same factory share
    the same file content, allowing the in-memory and on-disk caches
    to have a significantly smaller memory footprint
  * Change type of "body" key in UnifiedSymbolRepresentation to use
    SymbolBody instead of str
  * Adjust all usages of the "body" key
This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-01-22 01:39:59 +01:00
1 parent fe0cc7bb0c
commit c2e795fce4
13 files changed
+108 -56

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ class TestBashLanguageServerBasics:
assert greet_user_symbol is not None, "Should find greet_user function"
if "body" in greet_user_symbol:
body = greet_user_symbol["body"]
body = greet_user_symbol["body"].get_text()
assert "function greet_user()" in body, "Function body should contain function definition"
assert "case" in body.lower(), "Function body should contain case statement"