Yet Another Memory Optimization (YAMO)

Quick rating

Yet Another Memory Optimization (YAMO)

No reviews yet

Don't load JAR files in memory and lazy-load DFU

Performance & Optimization
Mod Loaders
NeoForge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
yammo-1.0.6.jar
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

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.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~31,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works