store serialized representations of ast nodes during module caching #6732
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
language server
LSP server
Copying this over from a comment in #6605
The motivation for this was noticing really high RAM usage in the language server now. For example, just running the counter example we can see 800mb of heap memory is never deallocated after the first compilation pass.
On digging it seems this is due to the new module caching where we hold onto the types themselves, thus never allow Drop to be called.
My motivation was to Serialize these types using postcard (same that is used in fuel-core) and then store the Serialize version in the module cache. We then need to Deserialize back into the original type on each keystroke which will incur some performance overhead but I haven't got any measurements yet.
The text was updated successfully, but these errors were encountered: