mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 00:15:05 +00:00
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:
1 parent
fe0cc7bb0c
commit
c2e795fce4
13 files changed
+108
-56
No files matched your search
@@ -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"
|
||||
|
||||
|
||||
Reference in new issue
Block a user