google / protobuf-dt

Eclipse Public License 1.0
40 stars 23 forks source link

strong references in cache ImportResolver => unbounded memory usage #3

Open jendap opened 8 years ago

jendap commented 8 years ago

After opening just a few proto files my 4GB eclipse run out of memory and has to restart. 95% memory is retained by com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/scoping/ImportResolver.java

What are we caching there? It looks like the key in Import (pretty much filename) and the value is ton of things - xtext objects and more. I'm not sure why is it so huge. Anyway,can we please make it a CacheBuilder.weakKeys().softValues()? Or explicitly invalidate (recursively) imports on file close?