RAM management problems
vvbv opened this issue ยท 1 comments
Is your feature request related to a problem? Yes
RAM consumption is slowly increasing. I need to load a lot of images, and I'm saving them in chests, but I'm slowly running out of RAM, I need to restart the game to get everything back to normal.
The solution
I suspect that RAM cleanup is not being done when the item stops being used. Setting the image instances to null, while not in the inventory or in a frame should fix the problem, or some alternative display method that recycles the allocated space in RAM.
With the event when closing the interface it could be solved.
Alternatives you've considered
I increased the amount of RAM to use, a map with only the images, the client (All RAM Free) and a Forge server (4GB RAM max), the server only has two players, 16GB of RAM is not enough.
Game version: Minecraft 1.18.2
All images that you saw while on that servers will stay in memory on the client. This is to avoid constant lag spikes when opening chests or visit areas with a lot of images. The server needs to send every image to every client, causing a lot of lag, since Minecraft networking system is not designed to handle these loads.
So the mod is designed to sacrifice ram instead of server/network performance. This also mitigates unintentional DOS attacks on the server from clients.