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
- [Memory-opti:fix leak] fix world leak caused by SBRWorldContext (GT5-Unofficial #6523)
- [Memory-opti:fix leak] fix world leak caused by MobHandlerLoader$MobEECRecipe#entityCopy (GT5-Unofficial #6427)
- [Memory-opti:fix leak] fix two world server memory leaks caused by pollution and chunk manager (GT5-Unofficial #6296)
- [Memory-opti:fix leak] fix world client leak in CTMUtils (Angelica #1724)
- [Memory-opti:fix leak] fix world client leak caused by lambda in IrisExclusiveUniforms$WorldInfoUniforms (Angelica #1701)
- [Memory-opti:fix leak] Fix dynamic lights world client leaks (Angelica #1700)
- [Memory-opti:fix leak] Fix cached item in RenderItemFrame leaking both world client and server (Angelica #1659)
- [Memory-opti:fix leak] fix two world client memory leaks (Angelica #1650)
- [Memory-opti:fix leak] Fix leaks in TickHandler (Applied-Energistics-2-Unofficial #1291)
- [Memory-opti:fix leak] Delete cache in waila plugin to avoid memory leak (Applied-Energistics-2-Unofficial #1264)
- [Memory-opti:fix leak] fix world client leak in MEGuiTextField (Applied-Energistics-2-Unofficial #1252)
- [Memory-opti:fix leak] Fix memory leak from AEBaseGui item renderer (Applied-Energistics-2-Unofficial #1248)
- [Memory-opti:fix leak] fix World Leak in GuiMEMonitorable (Applied-Energistics-2-Unofficial #1222)
- [Memory-opti:fix leak] Fix memory leak caused by ThreadLocal<RenderBlocksWorkaround> (Applied-Energistics-2-Unofficial #1215)
- [Memory-opti:fix leak] fix two world client memory leaks (Applied-Energistics-2-Unofficial #1183)
- [Memory-opti:fix leak] Fix world leak in MixinRenderBlockFluid (Angelica #1131)
- [Memory-opti:fix leak] Fix 2 world leaks in CraftingCPUCluster and AppEngRenderItem (Applied-Energistics-2-Unofficial #956)
- [Memory-opti:fix leak] fix memory leak in IC2 OverlayTESR (Hodgepodge #872)
- [Memory-opti:fix leak] fix forge's FakePlayerFactory leaking the world server (Hodgepodge #867)
- [Memory-opti:fix leak] fix world leak in TeleporterThaumcraft caused by LongHashMap transformer (Hodgepodge #863)
- [Memory-opti:fix leak] Fix 16 world client leaks in bibliocraft's TESR (Hodgepodge #853)
- [Memory-opti:fix leak] Fix RenderFallingBlock leaking world instance (Hodgepodge #842)
- [Memory-opti:fix leak] fix ic2 block reactor world leak (Hodgepodge #841)
- [Memory-opti:fix leak] fix RenderBlocks static instance leaking world (Hodgepodge #831)
- [Memory-opti:fix leak] Fix all remaining WorldClient leaks, 8 total (Hodgepodge #823)
- [Memory-opti:fix leak] fix ChunkGenScheduler memory leak (Hodgepodge #816)
- [Memory-opti:fix leak] Fix World MapStorage memory leak (Hodgepodge #815)
- [Memory-opti:fix leak] Fix memory leak caused by CommandBase#theAdmin (Hodgepodge #813)
- [Memory-opti:fix leak] fix CoFH world leak in main mod class (Hodgepodge #695)
- [Memory-opti:fix leak] Fix world leak in MinecraftServer by clearing the static server instance (Hodgepodge #675)
- [Memory-opti:fix leak] Fix world leak in SPacketMEUpdateBuffer (AE2FluidCraft-Rework #374)
- [Memory-opti:fix leak] Fix world leak in GuiHelper#BLANK_GUI (ServerUtilities #251)
- [Memory-opti:fix leak] Fix 4 world client leaks (EnderIO #235)
- [Memory-opti:fix leak] Fix world client leak in TechneMachineRenderer (EnderIO #233)
- [Memory-opti:fix leak] Fix World leak in WirelessChargerController (EnderIO #212)
- [Memory-opti:fix leak] Fix World leak in ConduitNetworkTickHandler (EnderIO #211)
- [Memory-opti:fix leak] fix 4 client leaks (BetterQuesting #206)
- [Memory-opti:fix leak] Fix server leak (BetterQuesting #196)
- [Memory-opti:fix leak] fix two world leaks (OpenComputers #189)
- [Memory-opti:fix leak] fix server leak caused by StaticSimpleEnvironment (OpenComputers #186)
- [Memory-opti:fix leak] Fix 4 world leaks (InventoryBogoSorter #182)
- [Memory-opti:fix leak] Fix world leak in PlayerContainerListener (BetterQuesting #179)
- [Memory-opti:fix leak] fix three world leaks in TESR (Botania #136)
- [Memory-opti:fix leak] fix world server memory leak (twilightforest #136)
- [Memory-opti:fix leak] Fix world client leak in ItemRendererFlag (Galacticraft #133)
- [Memory-opti:fix leak] fix net handler leak (BloodMagic #130)
- [Memory-opti:fix leak] Fix world server leak (Galacticraft #129)
- [Memory-opti:fix leak] fix leak in net handler by just copying fml code as the TODO suggests (LogisticsPipes #122)
- [Memory-opti:fix leak] Fix world client leaks in butterfly and analyzer renderer (ForestryMC #116)
- [Memory-opti:fix leak] Fix WorldClient memory leak (ForestryMC #113)
- [Memory-opti:fix leak] Fix world leak in ServerPacketBufferHandlerThread (LogisticsPipes #111)
- [Memory-opti:fix leak] Fix two world leaks (ThaumicHorizons #110)
- [Memory-opti:fix leak] Fix world leak in TileAnchorWorld (Railcraft #104)
- [Memory-opti:fix leak] Properly use client / common proxies to fix 5 memory leaks (Draconic-Evolution #97)
- [Memory-opti:fix leak] fix world client leak caused by static CraftGUI (Binnie #95)
- [Memory-opti:fix leak] Fix memory leak in ModularUIContext (ModularUI #94)
- [Memory-opti:fix leak] Fix memory leak (ThaumicTinkerer #91)
- [Memory-opti:fix leak] fix world client leak in RendererMachine (Binnie #90)
- [Memory-opti:fix leak] Fix world client memory leaks caused by block renderers (Chisel #88)
- [Memory-opti:fix leak] fix world client leak caused by light matrix (ProjectRed #81)
- [Memory-opti:fix leak] Fix server memory leak (VendingMachine #77)
- [Memory-opti:fix leak] fix 2 world server memory leak caused by reusableRun object pools (ProjectRed #76)
- [Memory-opti:fix leak] fix client leak from DataAccessorFMP (waila #65)
- [Memory-opti:fix leak] Fix two world leaks (Et-Futurum-Requiem #63)
- [Memory-opti:fix leak] Fix 4 World memory leaks and delete one unused file (LittleTiles #58)
- [Memory-opti:fix leak] Fix two world server leaks (Gadomancy #55)
- [Memory-opti:fix leak] fix world client memory leak in GuiMultiblockHandler (BlockRenderer6343 #48)
- [Memory-opti:fix leak] Fix two world client leaks in renderers (OpenBlocks #47)
- [Memory-opti:fix leak] fix world client leak in renderer (ForgeMultipart #44)
- [Memory-opti:fix leak] Fix world leak in Event class (Gadomancy #44)
- [Memory-opti:fix leak] fix world client leak (HydroEnergy #44)
- [Memory-opti:fix leak] fix world client from keybind handler (ForgeMultipart #43)
- [Memory-opti:fix leak] fix world server leak (ForgeMultipart #41)
- [Memory-opti:fix leak] fix 3 world server memory leaks in Tree Generators (Natura #41)
- [Memory-opti:fix leak] fix client world leak in RenderTileEssenceAltar (Hardcore-Ender-Expansion #38)
- [Memory-opti:fix leak] fix memory leak caused by PowerSources (WitcheryExtras #38)
- [Memory-opti:fix leak] fix world client leak in PreviewRenderer (ArchitectureCraft #36)
- [Memory-opti:fix leak] fix world client leak in CustomCubeRenderer (EnderCore #34)
- [Memory-opti:fix leak] Fix memory leak from PlayerHandler (Baubles-Expanded #33)
- [Memory-opti:fix leak] fix three world leaks (BuildCraft #32)
- [Memory-opti:fix leak] fix world server leak caused by EventWorldTick (Nutrition #32)
- [Memory-opti:fix leak] Fix 10 world client leaks in renderers (MalisisDoors #28)
- [Memory-opti:fix leak] Fix commands leaking server (CraftTweaker #27)
- [Memory-opti:fix leak] Fix world client leak (Infernal-Mobs #23)
- [Memory-opti:fix leak] Fix two world leaks (Amazing-Trophies #20)
- [Memory-opti:fix leak] Fix WorldServer memory leak (Random-Things #18)
- [Memory-opti:fix leak] fix world client leak from light matrix (MrTJPCore #16)
- [Memory-opti:fix leak] Do some cleanup + fix world client leak (WirelessRedstone-CBE #14)
- [Memory-opti:fix leak] fix light matrix world leak (ForgeRelocation #12)
- [Memory-opti:fix leak] Fix WorldClient memory leak (ForgeRelocation #9)
- [Memory-opti:fix leak] Do some cleanup / fix world client leak (CosmeticArmorReworked #2)
- [Memory-opti:fix leak] Fix memory leak in ImageBufferDownloadPlayerSkin (SimpleSkinBackport #1)
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