diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2022-09-01 19:25:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 13:25:03 +0200 |
commit | 21b803f324ade7b357998c1f712df538b244c4b9 (patch) | |
tree | dc2e318669a5a9743deac8a7af3dbedcb3e702c9 /src/main/java/gregtech/api/GregTech_API.java | |
parent | b1ac2dc90ec6847e5a328fb12a3ece3b670df33c (diff) | |
download | GT5-Unofficial-21b803f324ade7b357998c1f712df538b244c4b9.tar.gz GT5-Unofficial-21b803f324ade7b357998c1f712df538b244c4b9.tar.bz2 GT5-Unofficial-21b803f324ade7b357998c1f712df538b244c4b9.zip |
various loading time optimization (#1330)
* change to more performant GT_ItemStack2 in some maps
The exact performance improvement of this is hard to measure as it impacts both startup time and tick time, but in general identityHashCode should be faster than retrieving stuff from registry.
* improve performance for registerUsagesForMaterials
index the recipe list based on recipe type, so we no longer do 16*44*444 recipe match. this indexing reduced the total runtime from ~12 second to ~3.7 second.
* guess this not belongs here
* move type check earlier
* more GT_ItemStack2
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/api/GregTech_API.java')
-rw-r--r-- | src/main/java/gregtech/api/GregTech_API.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 56e80d4971..b565190507 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -99,7 +99,7 @@ public class GregTech_API { /** * Fixes the HashMap Mappings for ItemStacks once the Server started */ - public static final Collection<Map<GT_ItemStack, ?>> sItemStackMappings = new ArrayList<>(); + public static final Collection<Map<? extends GT_ItemStack, ?>> sItemStackMappings = new ArrayList<>(); public static final Collection<Map<Fluid, ?>> sFluidMappings = new ArrayList<>(); /** |