Draco18s / ReasonableRealism

For 1.10!
Other
17 stars 8 forks source link

HardLib is causing serious lag spikes #48

Open Xonok opened 2 years ago

Xonok commented 2 years ago

I'm building a modpack that I keep highly optimized. Recently I found that something is causing huge lag spikes, sometimes of several seconds. Spark has concluded that around 87% of tick length during lag spikes is caused by this one function in HardLib. What do I need to do to turn this part off? I'm using this version of HardLib(https://github.com/Draco18s/ReasonableRealism/issues/36), but the lag was also there with the latest 1.12 from curseforge. 2022-01-06 05_29_02-Window 2022-01-06 05_31_20-Profile at 05_12AM 1_6_2022 — Mozilla Firefox

Draco18s commented 2 years ago

Yeah, that'd be this method: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/api/recipes/RecipeToolMold.java#L117

If you don't care about the Tool Mold feature of Expanded Industry, you could create a recipe data pack and override all of the mold_xxx recipes: https://github.com/Draco18s/ReasonableRealism/tree/1.12.1/src/main/resources/assets/expindustry/recipes

I'll see about trying to optimize that method, but I'm not sure how much I can do.

Xonok commented 2 years ago

Yeah, don't really care about the molds. It seems turning them off through crafttweaker works.