Open CAD97 opened 4 years ago
What is the effect on peak memory usage for analysis stats using rust analyzer?
It's not going to have an immediate impact because r-a doesn't (IIUC) yet hold on to or reuse node caches.
Additionally, it will only potentially have an impact when holding onto a node cache after the deletion of a parse tree. We aren't really generating any garbage to clean up; it's only useful if the cache outlives the tree(s) that it's built.
Originally implemented in sorbus here: https://github.com/CAD97/sorbus/pull/46
Also exposes the
NodeCache
(closes #53) so that the gc is usable. WhileGreenNodeBuilder
has hadwith_cache
for a while, it's been impossible to actually share the cache, as there was no way to get a cache to share!