Skip to content

Optimize AnvilRecipe storage#208

Open
jchung01 wants to merge 3 commits into
CleanroomMC:cleanroomfrom
jchung01:anvil-optimization
Open

Optimize AnvilRecipe storage#208
jchung01 wants to merge 3 commits into
CleanroomMC:cleanroomfrom
jchung01:anvil-optimization

Conversation

@jchung01
Copy link
Copy Markdown

@jchung01 jchung01 commented May 13, 2026

This PR backports mezz/JustEnoughItems#3733, see it for more technical details.
Testing on a large modpack (MeatballCraft):

  • Memory usage by AnvilRecipeWrappers: 36.1 MB -> 8.4 MB.
  • Vanilla repair recipe creation time (during game load): 0.81ms -> 1.4ms.
  • Enchantment recipe creation time (during game load): 165.9ms -> 86.94ms.

jchung01 added 3 commits May 13, 2026 00:13
- Recipe outputs transform the input ingredient on-demand, reducing number of permanent copies stored
- Prefer use of ImmutableList for consistency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant