Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Performance issues with shift click crafting #3040
Shift clicking inside a crafting terminal can cause a major performance issue.
This is actually not directly caused by AE2, but due to the
There are not many options for AE2 itself. One good option is to only validate a complete crafting grid and not per changed slot. Which would reduce the amount of recipe lookups by up to 8. But this is still just a linear improvement. Should the lookup through forge scale worse with the amount of mods/recipes/handlers it might not solve anything.
Another option would be to avoid looking up a new recipe, if the inventory is actually unchanged after refilling it from the network. But this can certainly run into issue for very special cases (e.g. some has the idea to limit the recipe of once per day or so). But it might provide a very noticable improvement as it would reduce it to one lookup until the grid has actually changed. For example by about 63 looks up for a single shiftclick should the output be 1 per craft and stack up to 64.
An idea for a minor improvement might be to refill the grid before crafting. A full lookup seems to be a bit faster than a partial one. So ensuring that no slots actually changes besides the stacksize might be a minor improvement. But it comes with a hefty cost as we could no longer use oredict items as replacement due to being unable to put them into an occupied slot.
See the attached zip for two .nps snapshots with a very crude hack to validate the recipe once per grid vs for every slot change.