mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 04:16:34 +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
@@ -53,7 +53,7 @@ class TestElixirLanguageServerSymbols:
|
||||
assert containing_symbol["name"] == "def create_user(pid, id, name, email, roles \\\\ [])"
|
||||
assert containing_symbol["kind"] == SymbolKind.Method or containing_symbol["kind"] == SymbolKind.Function
|
||||
if "body" in containing_symbol:
|
||||
assert "def create_user" in containing_symbol["body"]
|
||||
assert "def create_user" in containing_symbol["body"].get_text()
|
||||
|
||||
@pytest.mark.parametrize("language_server", [Language.ELIXIR], indirect=True)
|
||||
def test_request_containing_symbol_module(self, language_server: SolidLanguageServer) -> None:
|
||||
|
||||
Reference in new issue
Block a user