Skip to content

The memory campaign

Index · Previous: The ModularUI2 port · Next: Angelica 2.x


A pack-wide sweep against memory use, across 59 mods. Individually each change is invisible; together they are why a long session no longer creeps toward the heap limit. The authors tagged their own work by kind, and this chapter keeps that split.

Memory leaks

Fixed 16 memory leaks across the pack that caused the game world and game client to remain in RAM long after they should have been cleared. These leaks accumulated during long play sessions and pushed your memory use toward the heap limit. You'll notice longer play sessions now stay stable instead of slowly creeping upward.

Shipped in 92 pull requests

Allocations during play

Eliminated unnecessary object creation and chunk loading during active gameplay. Optimizations include caching repeated enum lookups, preventing fluids and mobs from triggering chunk loads, and avoiding temporary ItemStack copies during recipe updates. These small allocations added up on every tick; your frame rate and frame time consistency should improve noticeably during heavy mob or fluid activity.

Shipped in 31 pull requests
  • [Memory-opti:runtime allocations] use long packing to avoid allocating object wrappers in the render loop in MetaGeneratedItemRenderer (GT5-Unofficial #6066)
  • [Memory-opti:runtime allocations] cache OutputBusType#values() (GT5-Unofficial #6047)
  • [Memory-opti:runtime allocations] Fix creation of ItemStack copy during recipe removal (GT5-Unofficial #5466)
  • [Memory-opti:runtime allocations] Cache Enum.values() calls (Applied-Energistics-2-Unofficial #1109)
  • [Memory-opti:runtime allocations] Prevent flowing liquids from loading chunks (Hodgepodge #787)
  • [Memory-opti:runtime allocations] Prevent entity pathfinding from loading chunks on the server (Hodgepodge #782)
  • [Memory-opti:runtime allocations] Prevent loading chunks when ticking vanilla blocs (Hodgepodge #778)
  • [Memory-opti:runtime allocations] Fix forge config memory bomb (Hodgepodge #775)
  • [Memory-opti:runtime allocations] Prevent grass tick from loading nearby chunks (Hodgepodge #771)
  • [Memory-opti:runtime allocations] fix Witchery Enum#values() spam (Hodgepodge #767)
  • [Memory-opti:runtime allocations] Replace Enum.values() calls in forge configuration Property$Type (Hodgepodge #763)
  • [Memory-opti:runtime allocations] Fix allocations of mixins @WrapMethod in MixinModelFHC (GTNHLib #298)
  • [Memory-opti:runtime allocations] Cache frequent Enum#values() calls (EnderIO #223)
  • [Memory-opti:runtime allocations] Prevent blocks from loading chunks while ticking (Galaxy-Space-GTNH #146)
  • [Memory-opti:runtime allocations] Prevent grass tick from loading nearby chunks (Galaxy-Space-GTNH #142)
  • [Memory-opti:runtime allocations] Fix ur-ghast armor renderer spamming allocations (twilightforest #137)
  • [Memory-opti:runtime allocations] Cache frequent Enum#values() calls (Galacticraft #123)
  • [Memory-opti:runtime allocations] cache EnumOre#values() (Railcraft #114)
  • [Memory-opti:runtime allocations] Prevent loading chunks while ticking blocks (ForestryMC #110)
  • [Memory-opti:runtime allocations] Cache frequent Enum#values() calls (ForestryMC #107)
  • [Memory-opti:runtime allocations] Avoid instantiating EntityItem in the render loop (Draconic-Evolution #99)
  • [Memory-opti:runtime allocations] Cache frequent Enum#values() calls (Binnie #86)
  • [Memory-opti:runtime allocations] Reduce amount of NBTTagCompound created in TileEntityMetadata#getItemStack (Binnie #78)
  • [Memory-opti:runtime allocations] Reduce amount of NBTTagCompound created in TileEntityMetadata#getItemStack (Binnie #77)
  • [Memory-opti:runtime allocations] cache frequent enum values (nei-custom-diagram #64)
  • [Memory-opti:runtime allocations] cache frequent enum.values() calls (MagicBees #59)
  • [Memory-opti:runtime allocations] Reduce NBT Tag spam (Gadomancy #45)
  • [Memory-opti:runtime allocations] cache more IronChestType#values() (ironchest #37)
  • [Memory-opti:runtime allocations] cache IronChestType#values() (ironchest #36)
  • [Memory-opti:runtime allocations] cache DyeColor#values() (EnderCore #30)
  • [Memory-opti:runtime allocations] prevent TileMachineReservoir#update from loading chunks when looking up blocks (RemoteIO #25)

Static memory

Reduced startup memory overhead by 120 MB total. Changes include caching advanced model renderers to eliminate duplicates, removing unused potion ID tags, and clearing tooltip modifier caches. Pack startup is faster and your baseline RAM use before playing is measurably lower.

Shipped in: GT5-Unofficial #6542, Hodgepodge #851, InGame-Info-XML #39, BuildCraft #23, ChromaticTooltipsCompat #1


Index · Previous: The ModularUI2 port · Next: Angelica 2.x