Open JoshuaBatty opened 4 months ago
Might be interesting to look into https://docs.rs/cstree/latest/cstree/, which implements some of the syntax tree design approaches initially presented by Roslyn (C# compiler) and Swift libsyntax.
Specifically:
cstree trees are trees over interned strings. This means cstree will deduplicate the text of tokens with the same source string, such as identifiers with the same name. In this position, rowan stores each token’s text together with its metadata as a custom DST (dynamically-sized type).
It would allow us to better intern and re-use parts of our syntax tree nodes.
Tracking issue for reducing the large RAM usage of the language server.