-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
scalatest has a problem with high memory consumption again:
scalatest/scalatest#235 (comment)
It requires about 2GB to compile its tests. I was digging into it a little bit by capturing memory snapshot at the end of typer. Yourkit suggests that we are leaking memory through undoLog. Specifically, it shows two things:
- UndoLog is a class at the top of the list of classes with the highest memory retention (right after Global, ::, etc.)
- Object with biggest distance from GC root is
TypeConstraintand its distance from GC root is 3 897 019. That is through series of::objects that containTuple2.
I can't imagine that we would go almost 4m deep in undoLog stack for any single compilation unit so it seems like we are leaking memory somehow.
Related: scala/scala#1238