Daan Schipper
Daan Schipper
I'm extracting log statements (log.info("some log message")), type hierarchies (A extends B) and the output of toString methods. I'm just extracting this information with a visitor and storing it in...
What does the `setStoreTokens()` exactly do? I was already using attribute comments.
I found a culprit, the cache in `JavaParserFacade` of `IdentityHashMap`! While parsing multiple files this cache just keeps growing and growing. In my case using 384/473 MB of the used...
The current implementation of the caches in `JavaParserFacade` allows them to keep growing without any limit. This should really be addressed, making users call `clearInstances` isn't fail proof
You could start indeed with a simple guava cache with a limited number of items. This could of course be improved by using weighted entries based on the number of...
As for reference, these are the memory usages of my application while parsing 25k files, the first is without `JavaParserFacade.clearInstances()` and the latter is with. The enormous spikes is because...
I'll count how many objects are present in those caches during my run so we can set a meaningful limit