Skip to content

Performance ​

Project Red Auto Crafting Benches cache their recipes ​

Project Red Auto Crafting Benches remember the recipe of each plan instead of searching the whole crafting recipe list again on every plan switch and every inventory change. They also count their stored ingredients once per craft rather than once per ingredient, so a row of benches costs the server less tick time.

Shipped in: ProjectRed #69

Watch on Discord

Leaving a world frees its memory ​

Quitting a world to the menu or changing dimension no longer leaves the old world in memory. Many mods kept a reference to the last world they saw, so loading a second singleplayer world kept the first one's integrated server in RAM as well. GregTech, AE2, Angelica, EnderIO, Forestry, BetterQuesting and OpenComputers are among the mods fixed, and Hodgepodge patches the same fault in Forge, vanilla Minecraft, IC2 and BiblioCraft.

Two leaks grew without limit and are gone. With Draconic Evolution Dislocator Inhibitors in the world, every dimension change kept another copy of the world until the game ran out of memory. Wearing the Twilight Forest Ur-Ghast trophy built a new model every frame until the game froze.

Shipped in 96 pull requests

Fewer allocations during play ​

More than twenty mods, among them GregTech, AE2, EnderIO, Forestry, Galacticraft and Logistics Pipes, no longer build a fresh array every time they look up one of their fixed lists of machine types, colours or ore kinds; each list is built once and reused. Several renderers stopped creating objects for every frame they draw. GregTech's item renderer no longer makes a lookup key per item drawn, and Draconic Evolution's Dissenchanter, Energy Infuser, Teleporter Stand, Upgrade Modifier and placed items reuse one item entity instead of spawning a new one each frame.

Shipped in 32 pull requests

Less memory held after startup ​

The client holds about 33 MB less after startup. Hodgepodge loads each Forge advanced model (the .obj and Techne models many mods draw blocks with) once and shares it, where mods used to load their own copies: 31 MB in the PR author's full-pack measurement, and loading gets a little quicker. GregTech no longer keeps its log messages in memory when its logging is turned off (2 MB).

Shipped in: GT5-Unofficial #6542, Hodgepodge #851, InGame-Info-XML #39

LittleTiles splits large builds faster and loads crowded worlds ​

Placing a LittleTiles build that spans many blocks splits it into those blocks faster. A world where many LittleTiles blocks border each other no longer crashes with a stack overflow while it loads: LittleTiles blocks stop passing each neighbour update on to all of their tiles.

Shipped in: LittleTiles #113, LittleTiles #43

Large smelteries and the crafting station cost less ​

Large Tinkers' smelteries cost less tick time: an item that cannot melt because the tank is full waits until the tank changes instead of being checked again and again, and melting results are cached. The crafting station remembers the last recipe it matched, so shift-clicking a stack of crafts no longer stutters. Tinkers' blocks such as the drying rack, casting table and basin draw with fewer calls, and drawing Tinkers' tools no longer churns memory every frame.

Shipped in: TinkersConstruct #321, TinkersConstruct #307, TinkersConstruct #253, TinkersConstruct #304, TinkersConstruct #338

HoloInventory holograms over big inventories cost less ​

HoloInventory adds up the items of a hologram in one pass instead of comparing every stack with every other one, so looking at a chest full of different items costs your client less.

Shipped in: HoloInventory #59, HoloInventory #56

Project Red gate models take less memory ​

Project Red gates keep two baked models per gate part, normal and mirrored, instead of one for each of the 48 orientations a gate can face, and turn them into place while drawing.

Shipped in: ProjectRed #78, ProjectRed #77

Faster game startup ​

GregTech's delayed crafting-recipe pass at startup went from about 990 ms to about 70 ms in the PR author's full-pack test. GregTech, NH Core Mod and IFU recipes stop asking to remove recipes that do not exist, and GregTech registers each pipe recipe once where it registered most of them five times. Three passes that scanned every recipe map at load to patch platinum sludge, cerium and naquadah outputs are gone; those outputs are set where the recipes are made.

OpenComputers spends about 100 ms transforming classes at startup instead of 850 ms, and Tinkers' Construct about half a second less checking which textures exist. Hodgepodge fixes a Forge config routine that copied a long list option's whole text again for every entry: reading Forestry's backpack config took about 3 seconds and 7 GB of allocations and now takes 30 ms.

Shipped in 18 pull requests

Faster fluid conduit transfers ​

Ender Fluid Conduits copy fluid stacks less often and ask each connected tank for its contents once per transfer instead of twice. Reservoirs and EnderIO's fluid tanks compare fluids directly instead of looking up their IDs, so large fluid networks cost less CPU.

Shipped in: EnderIO #221, EnderIO #218

Non-tickable GT hatches ​

Some end-game hatches are now non-tickable and no longer consume mspt. This also include laser vacuum pipe.

Shipped in: GT5-Unofficial #5900, GT5-Unofficial #7682

Received packets are limited by time, not count ​

Your client now works through received packets for up to 5 ms per tick instead of stopping after vanilla's 1001. A crowd of entities easily sends more than that: the queue kept growing, and ping seemed to climb while the server's mspt stayed low. The client command /packetstats incoming lists the ten packet types that arrive most over the next 200 ticks, and /packetstats queue counts what is still waiting. The Hodgepodge options changeReceivedPacketCountLimitToTimeLimit and receivedPacketTimeLimit switch the limit and set its budget.

Shipped in: Hodgepodge #1003, Hodgepodge #1004, VillageNames #15

Ticking blocks, fluids and mobs no longer load chunks ​

Blocks at the edge of the loaded area no longer load the chunk next to them when they tick: crops, grass, mycelium, vines, fire, saplings, cocoa, mushrooms, stems, torches and farmland. Flowing water, lava and mod fluids stop at that edge too, and mobs no longer load chunks while they look for a path. In 2.8, a vine or grass block on the border of a chunk-loaded base kept loading its neighbour, which unloaded and loaded again, and server tick time climbed over hours until a restart. Forestry's fruit pods, soils, fluids and mushrooms, Galaxy Space's Barnarda C grass and saplings, and the RemoteIO Reservoir got the same fix. The Hodgepodge switches are preventLoadingChunksWhenTickingBlocks, preventLoadingChunksWhenLiquidsFlow and preventLoadingChunksWhenPathfinding, all on by default.

Shipped in: Hodgepodge #778, Hodgepodge #771, Hodgepodge #787, Hodgepodge #782, ForestryMC #110, Galaxy-Space-GTNH #146, Galaxy-Space-GTNH #142, RemoteIO #25

BuildCraftOilTweak ​

  • #3 Optimized mod detection checks in the living update handler to improve performance. - @danyadev

    optimize isModLoaded checks

CodeChickenCore ​

  • #42 Optimized class hierarchy transformation performance, reducing load time from 342ms to 128.7ms. This speeds up game startup and resource reloading. - @danyadev

GT5-Unofficial ​

  • #7698 The renderers for the Antimatter Generator, Blackhole, Wormhole, Nano Forge and drone models, plus the work area overlay, now use a modern shader path when Angelica 2.1 is installed. They fall back to the old path when it is not. Most render setup now happens at startup or on resource reload, so the first frames should stall less. A Space Elevator bug where the saved wait time was read wrongly from NBT is also fixed. - @mitchej123

  • #7563 GregTech machines and pipes no longer run client ticks unless they need them. The profile in the PR shows World.updateEntities dropping from 36.21 to 12.91 in total time. Machine sounds now update when their state changes instead of being checked every tick. - @mitchej123

    • Note: Addon multiblocks, tanks, hatches, buffers, cables, pipes and frames no longer get onPreTick/onPostTick on the client unless they override needsClientTick() to return true. setBaseMetaTileEntity is now final in MetaTileEntity and MetaPipeEntity, and classes implementing IMetaTileEntity directly must add needsClientTick() and onClientSoundStateChanged().
  • #6680 The loader that generates fluid-instead-of-cell multiblock recipes runs faster during game loading, going from 127 ms to 13 ms. - @danyadev

    optimize RecipeGenMultisUsingFluidInsteadOfCells

  • #6674 The platinum sludge recipe loader runs faster during game loading, going from 228.5 ms to 83.5 ms. The recipes are unchanged. - @danyadev

    PlatinumSludgeOverHaul cleanup & optimization

  • #6491 Startup is faster because recipe removals that use non-default options are now buffered and done in bulk. The author measured 228 ms saved in a profile. - @danyadev

    implement buffering for removeRecipeByOutputDelayed calls with non-default options

  • #6476 Recipe loading is almost 4 seconds faster. Four dusts now have duplicate recipes for small and tiny piles: Ammonium Nitrate, Ancient Granite, Runite and Sodium Nitrate. Huge Clay Fluid Pipe gets a sixth duplicate recipe, where it had five before. - @danyadev

  • #6468 Removing furnace recipes during loading is much faster. It went from about 10% of GregTech loading time to 0.01%, which saved about 1.4 seconds on the author's machine. - @danyadev

    optimize removeFurnaceSmelting

  • #5882 Input buses and Linked Input Buses now compact their item slots faster. This removes lag reported with these buses. - @danyadev

    optimize fillStacksIntoFirstSlots

  • #5844 Leaving a world is faster. A handler that could take 100 ms even in a small pack no longer runs on leave, when it had nothing to do. - @danyadev

  • ...and 14 smaller change(s) in GT5-Unofficial, listed in the by-mod files.

GuideNH ​

  • #73 Guide reload takes less time and memory. Total reload work went from 574 ms to 413 ms, and sampled allocations dropped from 649 MiB to 303 MiB. - @danyadev

  • #70 Optimizes GuideNH resource loading by scanning resource packs once instead of twice and only reading markdown frontmatter during indexing, saving ~700ms on startup. - @danyadev

    Optimize resource reload

  • ...and 2 smaller change(s) in GuideNH, listed in the by-mod files.

lwjgl3ify ​

  • #331 Class transformer checks during loading are faster. The checks now use a shared byte pattern matcher from RetroFuturaBootstrap. - @danyadev
  • ...and 1 smaller change(s) in lwjgl3ify, listed in the by-mod files.

StructureLib ​

  • #54 Adding multiblock shapes during loading is faster. In the Forge of Gods example, the time dropped from 161 ms to 60.7 ms. - @danyadev

    optimize StructureDefinition.addShape

MatterManipulator ​

  • #24 Class transforming at startup spends less time in the DeMemberator transformer. It now skips classes outside the Matter Manipulator package, which cut its time from 45.4 ms to 9.5 ms. - @danyadev

Contributors ​

Everyone who authored, reviewed or co-authored a change on this page, with how many of them:

@Alexdoru (132), @boubou19 (82), @UltraProdigy (26), @danyadev (20), @mitchej123 (19), @Dream-Master (14), @DarkShadow44 (12), @Nikolay-Sitnikov (12), @Caedis (9), @Algent (8), @Kogepan229 (7), @koolkrafter5 (6), @sisyphussy (6), @AnsonYeung (4), @ABKQPO (3), @glowredman (3), @kurrycat2004 (3), @Luca-Guettinger (3), @MalTeeez (3), @OvermindDL1 (3), @RecursivePineapple (3), @slprime (3), @tiffit (3), @wlhlm (3), @cubefury (2), @EnderProyects (2), @Guvante (2), @lc-1337 (2), @leagris (2), @POPlol333 (2), @Pxx500 (2), @Ruling-0 (2), @Sanduhr32 (2), @0hwx (1), @combusterf (1), @Connor-Colenso (1), @eigenraven (1), @Glease (1), @JustACasualDay (1), @LazyFlesh (1), @MLGfruitshoot (1), @Nana-Sakura (1), @S4mpsa (1), @SwingURM (1), @Worive (1)