I did some tests in an image and I found this:
FamixJavaEntity allSubInstances size. "1.941.951"
FMSlotMultivalueLink allInstances size. "3.454.420"
(FMSlotMultivalueLink allInstances select: #isEmpty) size. "2.411.735"
So I have an image with 2 millions entities. In total they have 3.5millions collections to point to other entities. But out of those, 2.4 millions are empty which means we have collections taking up space for nothing.
My idea is to improve the FMMany so that it does not initialize itself with a FMSlotMultivalueLink but with a read only singleton of a Null entity that would get replaced the first time we add an element. Like this we would get only one instance in the image.