header effectheader

About (FastSuite 4.1.0+)


FastSuite enables faster execution of recipe matching through the use of concurrency. For any recipe type with more than 100 recipes, FastSuite will enable Concurrent Recipe Matching, and use multiple threads to match all recipe combinations, instead of relying on a single thread to perform this work. This was observed to produce a 10x - 12x speedup in All The Mods 8, as shown below:

[Multithreaded Test] - Took an average of 301960.28 ns to find the recipe for acacia planks
[Singlethreaded Test] - Took an average of 2774185.5 ns to find the recipe for acacia planks
[Multithreaded Test] - Took an average of 494851.94 ns to find the recipe for sticks
[Singlethreaded Test] - Took an average of 4500045.0 ns to find the recipe for sticks
[Multithreaded Test] - Took an average of 148572.14 ns to find the recipe for crafting table
[Singlethreaded Test] - Took an average of 3246270.5 ns to find the recipe for crafting table
[Multithreaded Test] - Took an average of 370346.56 ns to find the recipe for black shulker box
[Singlethreaded Test] - Took an average of 4711380.0 ns to find the recipe for black shulker box
[Multithreaded Test] - Took an average of 701000.56 ns to find the recipe for failed match
[Singlethreaded Test] - Took an average of 1.3034094E7 ns to find the recipe for failed match

Recipe types that exhibit problems with Concurrent Recipe Matching can be blacklisted in the configuration file.  As compared to the previous iterations of FastSuite, the concurrent matching model is more compatible (it works with Polymorph installed), and it always works (whereas the old model did not work if there was substantial recipe churn and did not work on the first match). It also is a bit less brittle, because it does not need to write any data during matching, which could cause issues if mods were matching recipes off-thread.


About (FastSuite 4.0.0 and older)


Similar to the projects FastWorkbench and FastFurnace, FastSuite is a mod about improving recipe performance.  However, unlike those two mods, it improves upon all mods that use the JSON recipe system, rather than just a specific subset of recipes.  It does this by turning the list of recipes from a Set into a LinkedList.  This list is then able to be reordered when a recipe is accessed, making accesses to it in the future much faster.  Recipes that are close enough to the front of the list (that are within the "cache size") are not moved to avoid churning.  The cache size is configurable, and each type of recipe has it's own cache space.




On the first access to a recipe, FastSuite will have identical performance to vanilla.  However, past that first access, the time spent to access a recipe will decrease.  This decrease can be substantial depending how far back in the list the recipe originally was.  The impact is also more dramatic depending on how many recipes are loaded into the game, as then there is a greater range for movement of recipes.  Below, we can see the performance improvements across access times to a few recipes, along with their index in the original recipe list order.  The following series of 6 tables is organized as such:
The leftmost column states the recipe, it's original index in the recipe list, and the current trial.  The next two columns compare FS/Vanilla recipe seek times in microseconds.  The default Cache Size is 100, and is applied here.  This means that entries that are not more than index 100 are not moved.  See this for more information.


There is a dramatic change in recipes that are normally found towards the end of the recipe list, as seen in Acacia Planks.  Recipes that are already towards the front of the list, such as Iron or Gold Nuggets, see minimal or no improvements.  As such, we can see that there is no harm in applying the benefits that FastSuite provides, as it has exceptional performance benefits when it is useful (>95% improvement on acacia planks), and no impact when it would otherwise provide no benefit (as seen in the case of attempting a Failure match).  We actually see slight detriments in Iron and Gold nuggets as they were within the Cache Size, and were actually pushed back by the operation of caching Acacia Planks, Sticks, and Crafting Tables.  However, there is little to no performance lost due to that, especially not as compared to the benefit from caching the later recipes.




This mod should work completely with all other mods.  It is made to be non-intrusive, and should not conflict with anything short of another mod also replacing the recipe manager.  It has been tailored such that it should work with recipe modification mods such as KubeJS and CraftTweaker, and it does not cause any issues with JEI.  I was able to load up All The Mods 3 and not notice any errors, and it was also tested in Skyfactory 1.

This mod does not replace FastWorkbench or FastFurnace, though their benefits will be lessened if this is installed, as some of the work will be offloaded to FastSuite.  To receive maximum performance with regards to recipes, I still advise having both of them installed, but if you had to pick just one, it should be FastSuite over either of the others.