recursiveSize uses a set represented as a list to check for boxes it already encountered. That is very inefficient; I'm measuring a tree-like data structure of about 40MB in size and I didn't bother letting the call finish. I fixed it by removing thelist, but obviously that doesn't work for cyclic data structures.
Not sure what can be done about this; ideally we'd simply put the pointer values into an IntMap, but that doesn't work with a moving GC. Very sad.
recursiveSizeuses a set represented as a list to check for boxes it already encountered. That is very inefficient; I'm measuring a tree-like data structure of about 40MB in size and I didn't bother letting the call finish. I fixed it by removing thelist, but obviously that doesn't work for cyclic data structures.Not sure what can be done about this; ideally we'd simply put the pointer values into an IntMap, but that doesn't work with a moving GC. Very sad.