Skip to content

DataFlowProblem and subclasses retain too much memory after running #2270

@headius

Description

@headius

I am investigating #2266 and have found that there are large numbers of HashMaps and other data structures kept alive by IRScope.dfProbs. On my system, running travis-core tests, JRuby 9k retains around 250MB more memory than JRuby 1.7.16 throughout the suite, causing the OOM (because the suite was already dangerously close to max).

Do we need to retain all data within these problems after they have run? I think now might be a good time to do a pass over all of IR...clear out state that's no longer needed at execution/JIT time and reduce some of these larger data structures down to basics.

FWIW, there may be other areas retaining lots of memory, but HashMap and related objects were the top three items in a heap dump, and everywhere I looked I saw IR holding references to data I don't think it needs for execution.

cc @subbu, @enebo

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions