diff --git a/src/codechicken/nei/recipe/GuiCraftingRecipe.java b/src/codechicken/nei/recipe/GuiCraftingRecipe.java index c7d79c96..e803032b 100644 --- a/src/codechicken/nei/recipe/GuiCraftingRecipe.java +++ b/src/codechicken/nei/recipe/GuiCraftingRecipe.java @@ -23,11 +23,15 @@ public class GuiCraftingRecipe extends GuiRecipe GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null; ArrayList handlers; + TaskProfiler profiler = ProfilerRecipeHandler.getProfiler(); try { + profiler.start("recipe.concurrent.crafting"); handlers = forkJoinPool.submit(() -> getCraftingHandlers(outputId, results)).get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); return false; + } finally { + profiler.end(); } if (handlers.isEmpty()) diff --git a/src/codechicken/nei/recipe/GuiUsageRecipe.java b/src/codechicken/nei/recipe/GuiUsageRecipe.java index 92fdae71..21a69086 100644 --- a/src/codechicken/nei/recipe/GuiUsageRecipe.java +++ b/src/codechicken/nei/recipe/GuiUsageRecipe.java @@ -1,5 +1,6 @@ package codechicken.nei.recipe; +import codechicken.core.TaskProfiler; import codechicken.nei.NEIClientUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -22,11 +23,15 @@ public class GuiUsageRecipe extends GuiRecipe GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null; ArrayList handlers; + TaskProfiler profiler = ProfilerRecipeHandler.getProfiler(); try { + profiler.start("recipe.concurrent.usage"); handlers = forkJoinPool.submit(() -> getUsageHandlers(inputId, ingredients)).get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); return false; + } finally { + profiler.end(); } if (handlers.isEmpty())