Just Enough Items (JEI)

Just Enough Items (JEI)

392M Downloads

Unreasonably high memory allocation by RecipeManager

starmun-0010 opened this issue ยท 5 comments

commented

Description
In extra large modpacks, RecipeManager is allocating massive amounts of memory.
Please see the screenshots below of the heap dump for reference, RecipeManager is taking ~ 882 MB of memory.

Question
I saw in the source code that there have been relatively recent changes of separating RecipeManager from RecipeManagerInternal, so are there any plans of taking the RecipeManagerInternal's caching away from memory and persisting it to disk? Such that it reduces the memory consumption significantly?
If not, I would like to request the permission for one of the following

  • Create a PR for user configurable alternative RecipeManager which caches to disk, invalidates caches on game startup and only loads selective recipe maps into memory when needed. Its response time will be obviously slightly slower but it will be significantly more memory efficient.
    OR
  • An Addon for JEI to do the same if you think such a feature will not fit within JEI

Thank you

Screenshots of Heap Dump

image

image

Related Issue

One of the major culprits is blue skies so I have created an issue in their repo:

https://gitlab.com/modding-legacy/blue-skies/-/issues/41

commented

@starmun-0010 has this been resolved?

commented

sorry, too busy to do further benchmarks right now. I'll try to test again and report back as soon as possible.

commented

Thanks for the report!
It looks like 2/3 of these recipes were from a single mod, is this still a problem now that they've fixed it?

commented

This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

commented

This has been automatically closed because it has not had recent activity. Please feel free to update or reopen it.