When using image multiple image samplers pointing to the same image path, the image gets loaded for each sampler. For abstract configs using image samplers that get extended a lot, this can quickly eat up memory, especially with large images.
This can be avoided by adding an image cache in each config pack, and letting the BufferedImage loader populate and hand out instances via the cache.
Issue Description
When using image multiple image samplers pointing to the same image path, the image gets loaded for each sampler. For abstract configs using image samplers that get extended a lot, this can quickly eat up memory, especially with large images.
This can be avoided by adding an image cache in each config pack, and letting the BufferedImage loader populate and hand out instances via the cache.
Full stacktrace
Posted by Daeron ( Garage Rock Summer Era)#1297 on discord https://mclo.gs/IZbt6lh