Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FMMany more memory efficient by sharing a default value #71

Open
jecisc opened this issue Jan 23, 2024 · 2 comments
Open

Make FMMany more memory efficient by sharing a default value #71

jecisc opened this issue Jan 23, 2024 · 2 comments

Comments

@jecisc
Copy link
Member

jecisc commented Jan 23, 2024

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.

@Gabriel-Darbord
Copy link
Member

Wasn't that done before using the now deprecated FMNullMultivalueLink?
I would also like to make FMSlotMultivalueLink a subclass of OrderedCollection, which should help regarding memory consumption.

@jecisc
Copy link
Member Author

jecisc commented Jan 29, 2024

FMNullMultivalueLink had one instance by collection without value inside but is was taking less space than FMMultivalueLink.

Here the idea would be to have one instance in the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants