ResourceManagedParser
io.joern.rubysrc2cpg.deprecated.astcreation.ResourceManagedParser
class ResourceManagedParser(clearLimit: Double) extends AutoCloseable
A re-usable parser object that clears the ANTLR DFA-cache if it determines that the memory usage is becoming large. Once this parser is closed, the whole cache is evicted.
This is done in this way since clearing the cache after each file is inefficient, since the cache must be re-built every time, but the cache can become unnecessarily large at times. The cache also does not evict itself at the end of parsing.
Value parameters
- clearLimit
-
the percentage of used heap to clear the DFA-cache on.
Attributes
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
In this article