GunModel Reserves 128MB Heap Space
Brittank88 opened this issue ยท 2 comments
Mod Loader
Fabric
Minecraft Version
1.18.2
Botania version
1.18.2-434
Modloader version
Fabric: Loader 0.14.8 + API 0.57.0+1.18.2
Modpack info
Res Mechanica | WIP (Currently private!)
The latest.log file
Issue description
After analysing a heap dump of my modpack in the Eclipse Memory Analysis tool, I have noticed that GunModel is reserving what seems to be an unnecessarily large amount of heap space:
Steps to reproduce
- Install Botania
- Enter a world
- Use MAT to generate and analyse a heap dump of the game (may need to edit MAT's memory allocation to be greater than the size of the heap dump in
MemoryAnalyzer.ini
). - View "Top Consumers"
Other information
No response
I think this is because we hold onto the ModelBakery
so we can do on-demand baking at runtime. Not sure of a good way to resolve this other than prebaking everything on startup.
At least adding it as a config option might be good.
Also, adding DashLoader compatibility so that it can cache all the pre-baked stuff for you would help in this regard. DashLoader is pretty good now in that it caches what mods it can and allows the rest to go about their processes normally.