When viewing items in HEI such as scrolling through pages, there is a very noticeable slowdown/freezing clientside as HEI waits for some textures to load. This slowdown is especially evident if there are custom resources in a /resources
folder, such as through ResourceLoader, ContentTweaker/BASE, and Roost. I know it should be expected that dynamic resources will affect performance as the game must load resources that were skipped in the loading stages, but the performance impact on HEI seems to be quite high when using custom resources.
Another scenario where this slowdown is noticeable is when you first load the vanilla textures in HEI (around the first 3 pages on large GUI scale) or otherwise have to reload those vanilla textures because (I assume) they are no longer in the cache. This is arguably the more important issue because this means when clearing your search or otherwise showing the first page of vanilla items, if vanilla textures need to reload, the search will be laggy. Spark profile for that here.
Some blocks/items I noticed considerably struggle to load in HEI are ones from the mods Advent of Ascension, DivineRPG, Betweenlands, Ice and Fire, and of course the aforementioned ContentTweaker.
The following Spark profiles give more info on what is causing these slowdowns (profiled while just scrolling through HEI):
- Profile with ResourceLoader enabled
- Profile with ContentTweaker resources
The slowdown seems to depend on the number of resources in the folder, as when I have ContentTweaker/BASE enabled but deleted the entire /resources
folder, HEI's performance improved compared to having many resources in the folder. I have highlighted what seem to be the biggest offenders in each profile, which seems to be due to calls to java.io.File.getCanonicalPath()
or more specifically java.io.WinNTFileSystem.canonicalize()
. I am using Windows, so I'm not sure if the performance impact would be different on Linux.
I tested on the modpack Meatballcraft (which is where all the Spark reports are from), which uses ResourceLoader, ContentTweaker, and Roost resources. I also tested briefly on E2EU, which seems to only noticeably lag in the scenario of (re)loading vanilla textures.
*Using VintageFix as of commit d4a3a56