Open turbanoff opened 3 weeks ago
Yes, solution to use LinkedHashSet instead of ArrayList for ClassImpl.subClasses
works. After changing I was able to open the heap dump in reasonable time.
looks related in #57
@turbanoff , thank you for the issue/analysis/fix. Are you able to share the heapdump or do any more analysis here?
As we saw in #57, the patch to GarbageCleaner to use FJ pool seems to have triggered this. https://github.com/eclipse-mat/mat/commit/7c2cb094fc6119999e14e1d8a04fe15c37c31f34
But the patch does not change the ClassImpl, which makes me wonder -- does the new ObjectMarker
implementation have a different bug that is leading to a larger list than expected?
Here the dump, which Eclipse MAT opens very slowly. Was able to create it with quite small program. java_pid12932.hprof.gz
I have a heap dump, which Eclipse MAT have troubles to open.![image](https://github.com/eclipse-mat/mat/assets/741251/ce8da468-621f-4d5c-96ad-2a76829b9e55)
Thread dump always show this stack trace:
I was able to attach debugger. Seems issue with huge lists, used by
Second one is - ![image](https://github.com/eclipse-mat/mat/assets/741251/be9de62a-5b4c-4665-8a98-b70cb6a84c94)
org.eclipse.mat.parser.internal.GarbageCleaner
First one is -org.eclipse.mat.parser.model.ClassImpl#subClasses
classes2remove
I think at least
org.eclipse.mat.parser.model.ClassImpl#subClasses
could be converted to HashSet/LinkedHashSet to makeClassImpl.removeSubClass
to be run in O(1).