Mineuniverse
Log in Register
Mods

Yet Another Memory Optimization (YAMO)

Don't load JAR files in memory and lazy-load DFU
by juds
Download Claim this project
27,566 downloads
0 likes
Updated Jul 6, 2026
0 hypes
Performance

Yet Another Memory Optimization (YAMO)

YAMO is an attempt to further optimize memory usage. It has two main features that can cut memory in (large) modpacks. The methods employed are somewhat hacky, so no guarantees that this works everywhere.

To fully experience what YAMO can do to free up memory you should create a new world with your pack, fly around a bit in creative, wait for a minute and then close and restart the game (for an explanation, see below).

In-memory JAR files

Mods are distributed as JAR files. The JAR loading mechanism that is part of NeoForge (and Forge) loads some inner JAR resources by keeping the entire file in memory. Most mods don't use this inner JAR mechanism, but some do. This can add up to hundreds of MBs in a large modpack.

The solution in YAMO is to store the in-memory JAR on disk in the 'cache/mods' subdirectory. Changes in the original JARs should be detected and the cache dir should be updated correctly. Deleting the cache dir is also fine, since it will be rebuild on the next run.

A further improvement to the JAR loading is in the in-memory index of the underlying ZIP structure. The JARs may be loaded multiple times from different places (might depend on JDK). When this is detected the ZIP index is deduped (which can be a couple of MBs for larger mods, e.g. MineColonies).

Attempt to load the DFU (DataFixerUpper) only when required

The DFU is responsible for upgrading NBT from older game versions to the current version on-the-fly. This is required when you load an old world where chunks, including blocks and entities, require updating. It is a complex rule-based process which requires 100Mb+ of RAM to store the rules efficiently so that the updating itself is fast. It has been much improved in terms of loading speed as well, so the need to load it lazily is smaller. To save memory this mod still attempts to load it only when required.

Because most mods that contain structures have NBT data from older versions it turns out that the DFU is required very quickly when you have some of those mods in your pack. When YAMO detects an old NBT structure it loads the DFU dynamically and then attempts to write all updated NBT structure data to the 'cache/structures' subdirectory. This process can take up to a minute and happens mostly in the background. The result is that all structures in your modpack are now available in the most recent NBT version and the DFU would not be required on the next run.

yammo-1.0.6.jar
MC Client, 1.21.1, NeoForge, Server
Release 2025-12-24 Get
yammo-1.0.0.jar
MC Client, NeoForge, 1.21.1, Server
Beta 2025-03-02 Get

More from juds

Arctic Nights
49,699
More Sweat Compat
1,479
Iris Block Compat
135,226

You Might Also Like

Better Biome Reblend
Updated version of Better Biome Blend, a mod that improves and fixes biome color blending
9,432,920
Icterine
Advancements optimization (specifically, InventoryChangeTrigger)
9,118,727
- FPS Booster - Lag Killer
powerful client-side performance FPS booster
97,463
Better Pie Chart
This Mod improves the Vanilla Pile Chart perfect for Minecraft SMP servers
9,603
Enhanced Block Entities Backforged
Reduce FPS lag with block entities, as well as customize them with resource packs. Forge 1.16.5 port of EBE
9,451
Unbinilium
Ubinilium is a Minecraft mod designed to optimize performance and enhance gameplay. It stabilizes FPS, renders distant blocks with reduced detail, and efficiently manages memory.
9,364